Welcome to CSE21! Lecture B Miles Jones MWF 9-9:50pm PCYN 109. Lecture D Russell (Impagliazzo) MWF 4-4:50am Center 101

Similar documents
Schoology Getting Started Guide for Teachers

Spring 2016 Stony Brook University Instructor: Dr. Paul Fodor

Class Meeting Time and Place: Section 3: MTWF10:00-10:50 TILT 221

CS 101 Computer Science I Fall Instructor Muller. Syllabus

CS 1103 Computer Science I Honors. Fall Instructor Muller. Syllabus

INTERMEDIATE ALGEBRA Course Syllabus

GACE Computer Science Assessment Test at a Glance

Math 96: Intermediate Algebra in Context

MATH 1A: Calculus I Sec 01 Winter 2017 Room E31 MTWThF 8:30-9:20AM

Data Structures and Algorithms

(Sub)Gradient Descent

PHY2048 Syllabus - Physics with Calculus 1 Fall 2014

Penn State University - University Park MATH 140 Instructor Syllabus, Calculus with Analytic Geometry I Fall 2010

CS177 Python Programming

Course Content Concepts

Houghton Mifflin Online Assessment System Walkthrough Guide

MATH 205: Mathematics for K 8 Teachers: Number and Operations Western Kentucky University Spring 2017

Office Hours: Mon & Fri 10:00-12:00. Course Description

Instructor Dr. Kimberly D. Schurmeier

Grade 2: Using a Number Line to Order and Compare Numbers Place Value Horizontal Content Strand

WSU Five-Year Program Review Self-Study Cover Page

State University of New York at Buffalo INTRODUCTION TO STATISTICS PSC 408 Fall 2015 M,W,F 1-1:50 NSC 210

Introduction. Chem 110: Chemical Principles 1 Sections 40-52


CS 100: Principles of Computing

BADM 641 (sec. 7D1) (on-line) Decision Analysis August 16 October 6, 2017 CRN: 83777

How to set up gradebook categories in Moodle 2.

CS 3516: Computer Networks

THE UNIVERSITY OF SYDNEY Semester 2, Information Sheet for MATH2068/2988 Number Theory and Cryptography

IPHY 3410 Section 1 - Introduction to Human Anatomy Lecture Syllabus (Spring, 2017)

Instructor. Darlene Diaz. Office SCC-SC-124. Phone (714) Course Information

Foothill College Summer 2016

Introduction to Moodle

*In Ancient Greek: *In English: micro = small macro = large economia = management of the household or family

Physics Experimental Physics II: Electricity and Magnetism Prof. Eno Spring 2017

Stacks Teacher notes. Activity description. Suitability. Time. AMP resources. Equipment. Key mathematical language. Key processes

Syllabus: CS 377 Communication and Ethical Issues in Computing 3 Credit Hours Prerequisite: CS 251, Data Structures Fall 2015

Accounting 312: Fundamentals of Managerial Accounting Syllabus Spring Brown

FINN FINANCIAL MANAGEMENT Spring 2014

Science Olympiad Competition Model This! Event Guidelines

T/Th 8:00 AM 9:20 AM office Muir Biology Building 4268 (best contact) Peterson 108 (B)

Ascension Health LMS. SumTotal 8.2 SP3. SumTotal 8.2 Changes Guide. Ascension

Probability and Game Theory Course Syllabus

Case study Norway case 1

AGN 331 Soil Science Lecture & Laboratory Face to Face Version, Spring, 2012 Syllabus

Introduction to Information System

Outreach Connect User Manual

University of Waterloo School of Accountancy. AFM 102: Introductory Management Accounting. Fall Term 2004: Section 4

CIS 121 INTRODUCTION TO COMPUTER INFORMATION SYSTEMS - SYLLABUS

The Moodle and joule 2 Teacher Toolkit

CIS Introduction to Digital Forensics 12:30pm--1:50pm, Tuesday/Thursday, SERC 206, Fall 2015

BUS Computer Concepts and Applications for Business Fall 2012

Connect Microbiology. Training Guide

Getting Started with Deliberate Practice

The University of Southern Mississippi

Computer Science 1015F ~ 2016 ~ Notes to Students

Adult Degree Program. MyWPclasses (Moodle) Guide

CS Course Missive

Economics 201 Principles of Microeconomics Fall 2010 MWF 10:00 10:50am 160 Bryan Building

SELF: CONNECTING CAREERS TO PERSONAL INTERESTS. Essential Question: How Can I Connect My Interests to M y Work?

CHEMISTRY 104 FALL Lecture 1: TR 9:30-10:45 a.m. in Chem 1351 Lecture 2: TR 1:00-2:15 p.m. in Chem 1361

EDCI 699 Statistics: Content, Process, Application COURSE SYLLABUS: SPRING 2016

Math 181, Calculus I

Common Core State Standards

UNIT ONE Tools of Algebra

EECS 700: Computer Modeling, Simulation, and Visualization Fall 2014

Algebra Nation and Computer Science for MS Initiatives. Marla Davis, Ph.D. NBCT Office of Secondary Education

MAT 122 Intermediate Algebra Syllabus Summer 2016

BIODIVERSITY: CAUSES, CONSEQUENCES, AND CONSERVATION

MOODLE 2.0 GLOSSARY TUTORIALS

Exploration. CS : Deep Reinforcement Learning Sergey Levine

ITSC 1301 Introduction to Computers Course Syllabus

ACTL5103 Stochastic Modelling For Actuaries. Course Outline Semester 2, 2014

Teaching a Discussion Section

ACCOUNTING FOR MANAGERS BU-5190-OL Syllabus

Syllabus Foundations of Finance Summer 2014 FINC-UB

Lesson 12. Lesson 12. Suggested Lesson Structure. Round to Different Place Values (6 minutes) Fluency Practice (12 minutes)

Spring 2014 SYLLABUS Michigan State University STT 430: Probability and Statistics for Engineering

Scientific Method Investigation of Plant Seed Germination

Excel Intermediate

Foothill College Fall 2014 Math My Way Math 230/235 MTWThF 10:00-11:50 (click on Math My Way tab) Math My Way Instructors:

SYLLABUS. EC 322 Intermediate Macroeconomics Fall 2012

KOMAR UNIVERSITY OF SCIENCE AND TECHNOLOGY (KUST)

International Business BADM 455, Section 2 Spring 2008

San José State University Department of Psychology PSYC , Human Learning, Spring 2017

Using SAM Central With iread

36TITE 140. Course Description:

New Paths to Learning with Chromebooks

CENTRAL MAINE COMMUNITY COLLEGE Introduction to Computer Applications BCA ; FALL 2011

i>clicker Setup Training Documentation This document explains the process of integrating your i>clicker software with your Moodle course.

AQUA: An Ontology-Driven Question Answering System

LEGO MINDSTORMS Education EV3 Coding Activities

BUAD 425 Data Analysis for Decision Making Syllabus Fall 2015

How to make an A in Physics 101/102. Submitted by students who earned an A in PHYS 101 and PHYS 102.

Build on students informal understanding of sharing and proportionality to develop initial fraction concepts.

Java Programming. Specialized Certificate

Presented by Paula Kordic, College Now Coordinator August 8, 2016 College Now Orientation

Course Syllabus for Math

Self Study Report Computer Science

Objectives. Chapter 2: The Representation of Knowledge. Expert Systems: Principles and Programming, Fourth Edition

Transcription:

Welcome to CSE21! Lecture B Miles Jones MWF 9-9:50pm PCYN 109 Lecture D Russell (Impagliazzo) MWF 4-4:50am Center 101 http://cseweb.ucsd.edu/classes/sp16/cse21-bd/ March 28, 2016

About this course Formulate & solve problems Describe data Analyze algorithms Using math

About this course Why is math part of the CS curriculum? Proofs: key to convincing arguments, but also key part of software engineering Vocabulary: basic language of Computer Science Quantitative Analysis: are our solutions / programs / algorithms good enough? How much computational resources (time, memory, power) does our solution use?

Have you used iclickers before? A. Yes B. No About you PCYN 109:?? Center 101:?? To change your remote frequency 1. Press and hold power button until flashing 2. Enter two-letter code 3. Checkmark / green light indicates success

About you Did you take CSE 20 at UC San Diego? A. Yes B. No, I took Math 15A instead C. No, I took an equivalent course D. No, for some other reason. PCYN 109:?? Center 101:?? To change your remote frequency 1. Press and hold power button until flashing 2. Enter two-letter code 3. Checkmark / green light indicates success

About you PCYN 109:?? Center 101:?? To change your remote frequency 1. Press and hold power button until flashing 2. Enter two-letter code 3. Checkmark / green light indicates success What other CSE class are you taking this quarter? A. None. B. CSE 12. C. CSE 11. D. CSE 8B. E. Some other CSE class.

Introductions

Short answer: HW 1. What do we assume you know? Longer answer: Rosen Chapters 1, 2, some of 5, some of 9. Longest answer: You can describe algorithms and their correctness using precise mathematical terminology and techniques. For example: Sets, relations (equivalence relations, orders) Logical equivalence, conditionals, hypotheses, conditionals, contrapositives Universal and existential quantifiers Proof by contradiction (indirect proof) Proof by induction Algorithm invariants

Logistics, part 1 Textbook: Rosen 7th Edition Participation: Class times (iclicker questions) https://tritoned.ucsd.edu Discussion (quizzes) https://sections.ucsd.edu Exams: First Exam: Friday, April 22 Second Exam: Friday, May 20 Final Exam: B00: Wednesday, June 8 (8-11 AM) D00: Thursday, June 9 (3-6 PM)

Logistics, part 2 Websites: Class Website: http://cseweb.ucsd.edu/classes/sp16/cse21-bd/ Homework assigments, calendar, announcements, study guides, contact info, lecture slides (avail. Day after lecture.) Gradescope: gradescope.com Homework submission and exam return. TritonEd (Ted): https://tritoned.ucsd.edu Participaton scores. Piazza: Announcements and Q&A. Contact instructors here! No HW questions on Piazza. Office hours: Instructors and tutors. Discuss HW questions here!

Logistics, part 2 Exams (60%), HW (35%), Participation (5%) * Details on class website: http://cseweb.ucsd.edu/classes/sp16/cse21-bd/ * Drop lowest HW score * Drop lowest midterm score if do better on final * Can use note sheet for exams * Participation earned via class participation, discussion quizzes, and piazza * Credit for participation if answer 80% of clicker question in that day's class * HW and exams answers evaluated not only on the correctness of your answers, but on your ability to effectively communicate your ideas and convince the reader of your conclusions through proofs and logical reasoning.

Academic Integrity Scenarios You re working on a homework question and run across a definition you don t understand. You Google the term and the first hit includes a full solution to the homework question. You avoid reading the solution and close the browser. You keep working on the solution and hand in the assignment, without mentioning the Google search since you didn t use the result. Is this acceptable? A. Yes B. No

Academic Integrity Scenarios You re not sure if you are interpreting a homework problem correctly. You write a post on Piazza showing what you did to answer it, and asking if this is the correct way of interpreting the question. Is this acceptable? A. Yes B. No

Academic Integrity Scenarios You form a study group with two friends and start working on the next homework. Since there are 6 questions you each pick two questions, think about them, and write out your solutions in a shared Google doc. You glance over each other's work before turning in the assignment. Is this acceptable? A. Yes B. No

Goals 1. Learn concepts which computer science relies upon: Algorithms Asymptotic notation Recurrence relations Graphs Enumeration and data representation Probability

An example of CS vocabulary: Trees Data structure: Binary search trees Stay tuned: Chapter 11 in Rosen, Week 6

Algorithm: parsing An example of CS vocabulary: Trees

An example of CS vocabulary: Trees Model: possible paths of computation

An example of CS vocabulary: Trees Model: Phylogenetic (evolutionary) tree

An example of CS vocabulary: Trees State space: possible configurations of a game

An example of CS vocabulary: Trees Conclusion: Many different applications but same underlying idea. How do we define a tree? What properties are guaranteed by this definition? What algorithms can exploit these properties?

Goals 2. Solve problems. Come up with *new* algorithms Think of the homework questions as puzzles that you need to unravel: the solution or even the approach won't be clear right away. You can work on homework in groups of 1-3 students.

Sorting (or Ordering) Section 3.1 in Rosen vs. * Assume elements of the set to be sorted have some underlying order

Sorting (or Ordering) Which of the following collections of elements is listed in sorted order? A. 42, 10, 30, 25 B. 10, 25, 30, 40 C. 40, 30, 25, 10 D. All of the above E. None of the above

Why sort? A TA facing a stack of exams needs to input all 400 scores into a spreadsheet where the students are listed in alphabetical order. OR You want to find all the duplicate values in a long list.

Why sort? A TA facing a stack of exams needs to input all 400 scores into a spreadsheet where the students are listed in alphabetical order. OR You want to find all the duplicate values in a long list. It's easier to access data when it is sorted because you know exactly where to find it.

DIY: Sorting Algorithms 1. Find a group of about 20 people nearby. Write your first names on separate papers. 2. Sort the names of the people in your group alphabetically by first name. 3. Discuss as a group the strategy you used to sort the papers, and how you might describe it to someone else. 4. Write a clear English description of the strategy your group used (each person should do this.) 5. Select one representative to describe your group's strategy on the board.

Discussion of Sorting Algorithms Is the strategy clear? Will the strategy always work? Does the strategy scale well to bigger groups?

General questions to ask about algorithms 1) What problem are we solving? 2) How do we solve the problem? 3) Why do these steps solve the problem? 4) When do we get an answer?

General questions to ask about algorithms 1) What problem are we solving? PROBLEM SPECIFICATION 2) How do we solve the problem? ALGORITHM DESCRIPTION 3) Why do these steps solve the problem? CORRECTNESSS 4) When do we get an answer? RUNNING TIME PERFORMANCE

Sorting: Specification: WHAT Rosen page 196 Given a list a1, a2,..., an rearrange the values so that a1 <= a2 <=... <= an Values can be any type (with underlying total order). For simplicity, use integers.

Your approaches: HOW

Selection Sort (Min Sort) "Find the first name alphabetically, move it to the front. Then look for the next one, move it, etc.''

Selection Sort (MinSort) Pseudocode Rosen page 203, exercises 41-42 procedure selection sort(a1, a2,..., an: real numbers with n >=2 ) for i := 1 to n-1 m := i for j:= i+1 to n if ( aj < am ) then m := j interchange ai and am { a1,..., an is in increasing order}

Bubble Sort "Compare the first two cards, and if the first is bigger, keep comparing it to the next card in the stack until we find one larger than it. Repeat until the stack is sorted.''

Bubble Sort Pseudocode Rosen page 197 procedure bubble sort(a1, a2,..., an: real numbers with n >=2 ) for i := 1 to n-1 for j:= 1 to n-i if ( aj > aj+1 ) then interchange aj and aj+1 { a1,..., an is in increasing order}

Insertion Sort "We passed the cards from right to left, each individual inserting their own card in the correct position as they relayed the pile."

Insertion Sort Pseudocode Rosen page 198 procedure insertion sort(a1, a2,..., an: real numbers with n >=2 ) for j := 2 to n i := 1 while aj > ai i := i+1 m := aj for k := 0 to j-i-1 aj-k := aj-k-1 ai := m { a1,..., an is in increasing order}

Bucket Sort "Call out from A to Z, collecting cards by first letter. If there are more than one with the same first letter, repeat with the second letter, and so on.''

Bucket Sort Pseudo pseudo code Create empty buckets that have an ordering. Put each of the elements of the list into the correct bucket. Sort within each bucket. Concatenate the buckets in order.

Merge Sort "We split into two groups and organized each of the groups, then got back together and figured out how to interleave the groups in order."

Rosen page 196, 367-370 Merge Sort Pseudo pseudo code If the list has just one element, return. Otherwise, Divide list into two pieces: L1 = a1... an/2 and L2 = an/2+1... an M1 = Merge sort ( L1 ) M2 = Merge sort ( L2 ) Merge the two (sorted) lists M1 and M2

Others? Bogo sort Quick sort Binary search tree traversal https://en.wikipedia.org/wiki/sorting_algorithm

Why so many algorithms?

Why so many algorithms? Practice for homework / exam / job interviews. Some algorithms are better than others. Wait, better?

Reminders Read syllabus on class website. Enroll in Piazza and Gradescope. Register iclicker. Sign up for discussion section. Discussion sections start today. HW 1 due Wednesday 11:59pm.