Welcome to Programming Practicum “Putting the C into CS” You aren’t here writing clinic reports clinic liaison phone call coding chunky strings rebooting.

Slides:



Advertisements
Similar presentations
ACM Programming Team Bill Punch. ACM Programming Contest One of the premier programming competitions. Held every year since 1977 MSU was the winner that.
Advertisements

Make sure you know the day and time of the final exam for this section of Math 110: Day: ______ Date:______ Time: ______ to _______ All Math 110.
1 Week 2 Questions / Concerns Schedule this week: Homework1 & Lab1a due at midnight on Friday. Sherry will be in Klamath Falls on Friday Lexical Analyzer.
Intro to CIT 594
Jotto! JRsSRsElderly A word-guessing game similar to mastermind… slate 3 This term's first class to guess another's word earns 1 problem... slate 2slate.
Algorithms for Multiplication and Division
Jotto! SophsJrsSrs audio 1audio 2audio 1 Frosh audio 2 graze 3graze 1 graze 2 alloy 1 alloy 2 fresh 2fresh 1fresh 2fresh 1 This term's first class to guess.
Intro to CIT 594
CS503: Tenth Lecture, Fall 2008 Review Michael Barnathan.
Genome Sciences 373 Genome Informatics Quiz Section #1 March 31, 2015.
Please open your laptops, log in to the MyMathLab course web site, and open Daily Quiz 18. You will have 10 minutes for today’s quiz. The second problem.
Test Preparation Strategies
Introduction to Programming Environments for Secondary Education CS 1140 Dr. Ben Schafer Department of Computer Science.
CS1101: Programming Methodology Aaron Tan.
Computer Science 101 Introduction to Programming.
ACM Programming Contests
Welcome to Programming Practicum You aren’t here writing clinic reports clinic liaison phone call coding chunky strings rebooting knuth (or turing or…)
Welcome to Programming Practicum “Putting the C into CS” You aren’t here writing clinic reports clinic liaison phone call coding chunky strings rebooting.
Spring 2008 Mark Fontenot CSE Honors Principles of Computer Science I Note Set 1 1.
1 Lab Session-III CSIT-120 Fall 2000 Revising Previous session Data input and output While loop Exercise Limits and Bounds Session III-B (starts on slide.
COMP 111 Programming Languages 1 First Day. Course COMP111 Dr. Abdul-Hameed Assawadi Office: Room AS15 – No. 2 Tel: Ext. ??
May 19-22,  Become familiar with the Fostering Algebraic Thinking materials.  Examine activities that may be challenging to facilitate. 
COMP Introduction to Programming Yi Hong May 13, 2015.
Chapter Eight Academic Survival Skills. Study Skills  For most students time is the greatest issue.  The first rule to follow is to allow two or three.
Welcome to Programming Practicum “Putting the C into CS” You aren’t here writing clinic reports clinic liaison phone call coding chunky strings rebooting.
CS 114 – Class 02 Topics  Computer programs  Using the compiler Assignments  Read pages for Thursday.  We will go to the lab on Thursday.
Welcome to CS 115! Introduction to Programming. Class URL Write this down!
1.2. P ROJECT I NFORMATION Important project information and advice.
Lecture 5 Announcements. HW2 – Regrading Thinking like a programmer –Part b: (5 points) Test for input in the range it is specified (otherwise what is.
Welcome to Programming Practicum “Putting the C into CS” You aren’t here writing clinic reports Lecture clinic liaison phone call coding chunky strings.
Please CLOSE YOUR LAPTOPS, and turn off and put away your cell phones, and get out your note- taking materials.
COT 5405 Spring 2009 Discussion Session 3. Introduction Our weekly discussion class are like organized TA office hours. Here we encourage students to.
COMP 208/214/215/216 – Lecture 8 Demonstrations and Portfolios.
Curricularizing the ACM... ? Zach Dodds ~ November 13, 2010.
ACM today Some nice unix commands… practice problems? code.google.com/codejam/ This week: beyond Floyd-Warshall.
ACM today This week's problems… New and improved :-) ACM table slacking! not slacking… missing entries? let me know…
Coming Up: Today: Review Quiz 2 Lecture on Section 2.4: Word problems! NOTE: This homework is due at the beginning of the next class session. Coming up.
June 19, Liang-Jun Zhang MTWRF 9:45-11:15 am Sitterson Hall 011 Comp 110 Introduction to Programming.
Topic 25 Dynamic Programming "Thus, I thought dynamic programming was a good name. It was something not even a Congressman could object to. So I used it.
ACM reminders October HMC Mock contest 9: :30 November regional contest This is the next ACM meeting !! Contest-like problems dynamic.
Welcome to Programming Practicum “Putting the C into CS” You aren’t here writing clinic reports clinic liaison phone call coding chunky strings rebooting.
1 CS1100 Fall Instructor: David Gries CS100M: Matlab No prior programming experience One semester of calculus Math & engineering type problems CS100J:
Please CLOSE YOUR LAPTOPS, and turn off and put away your cell phones, and get out your note- taking materials.
WELCOME to CS244 Brent M. Dingle, Ph.D Game Design and Development Program Mathematics, Statistics and Computer Science University of Wisconsin -
The SECOND Meeting Or: How I learned exciting new things in CS Club.
1 CS1430: Programming in C++ Section 2 Instructor: Qi Yang 213 Ullrich
Intro to CIT 594
Hank Childs, University of Oregon Isosurfacing (Part 3)
Reactive and Output-Only HKOI Training Team 2006 Liu Chi Man (cx) 11 Feb 2006.
Welcome to AT Math! Colleen Stefani
Compsci 101.2, Fall Plan for FWON l Review current assignments and APTs  Review Dictionaries and how to use them  Code and APT walk-through.
CS1101: Programming Methodology Preparing for Practical Exam (PE)
Welcome to Programming Practicum “Putting the C into CS” You aren’t here writing clinic reports clinic liaison phone call coding chunky strings rebooting.
Research Experience Program (REP) Fall 2007 Psychology 100 Ψ.
Welcome to Programming Practicum “Putting the C into CS” You aren’t here writing clinic reports clinic liaison phone call coding chunky strings rebooting.
MIS 610: Seminar in Information Systems Management Yong Choi School of Business Administration CSU, Bakersfield.
Coming Up: Today: Review Quiz 2 Lecture on Section 2.4: Word problems! NOTE: This homework is due at the beginning of the next class session. Coming up.
Harbin, China 2010 finals ACM today… ! (2009) Knapsack DP for NP! Floyd-Warshall DP for APSP! Max Flow.
PROBLEM SOLVING AND PROGRAMMING ISMAIL ABUMUHFOUZ | CS 170.
Spring 2008 Mark Fontenot CSE 1341 – Honors Principles of Computer Science I Note Set 1 1.
Welcome to CS 115! Introduction to Programming Spring 2016.
Comp1202: Conclusions Revision Session. Coming up Key Concepts - The Pillars HashMaps Exceptions The Exam Some Last Words.
ACM today The Fall competition is getting organized… it's going to be lonely…
Elementary Programming Concepts Hannah Westra
CS 241 – Computer Programming II Lab
CMPT 409 – Competitive Programming (Spring 2018)
Jotto! Frosh Sophs Jrs Srs audio 2 audio 1 audio 2 audio 1 graze 2
Some Basics for Problem Analysis and Solutions
Jotto! Sophs Jrs Srs Profs pluot 1 pluot 2 pluot 1 pluot 2 squid 2
ACM today… ! DP for NP! DP for APSP! Knapsack Floyd-Warshall
Presentation transcript:

Welcome to Programming Practicum “Putting the C into CS” You aren’t here writing clinic reports clinic liaison phone call coding chunky strings rebooting knuth (or turing or…) installing Debian 3.1 Engineering dept. the dumpster University of St. Petersburg On the 405, in traffic, being chased by police (and TV) helicopters. Mailing something at the Claremont Post Office Waiting for the snow enveloping you on Route 5 N to melt Krispy Kreme’s drive-through Teaching Honors English for Janice Barbee at Pomona High School Worldcom Headquarters Leading a Gray Davis / Gary Coleman / Arnold “T-800” Schwarzenegger gubernatorial fundraiser exploring martian soil Being dragged off-course 18 miles into a marathon race by a crazed spectator Massey University Palmerston North, NZ Pittsburgh Driving N on the Dalton Highway… (though it feels like it!) Victorville, for DARPA's UGC Waiting in line to vote in the Florida primaries… Denver, CO or Minneapolis, MN DC for the inauguration

What is this course about?

A chance to “improve” your programming skills Algorithm analysis and insight Program design and implementation optimizing coding time ACM programming contest What Why Research/prototype programming Hands-on practice with algorithms and techniques Unofficial course name: CS -70 Familiarity with Java’s libraries OR your choice of language "somewhat reasonable"

Last year's ACM regional programming contest Aaron Pribadi, Stuart Persteiner, and Daniel Lubarov Anak Yodpinyanee + Jason GarretGlaser Kevin Oelze, Andrew Hunter, and Kwang Ketcham Marquis Wang, Josh Ehrlich, and Daniel Fielder

Class Organization alternating format discussion sessions lab sessions problem and program analysis discussion of strategy and coding tips deciding on functional decomposition, data structures, language facilities, and algorithms to use in teams of 2-3 teams may use 1 machine per person (only the mock contest adheres to ACM rules) these problems count for each member of the group sometimes new problems, other times with known ones ~ 4 problems given out per week… a team can always practice with only 1 machine

Class Organization Feedback from prior semesters… make individual vs. team-based work clear, lectures vs. labs problems are always individually submitted -- but there should be an opportunity to start coding “cold” snacks and jotto! problems per person per week? about 1~2 (if you work on a team in lab) and consider all of the weeks of the term! each team member may submit shared lab problems submit for each person ( me if there are problems…) provide the code to all team members you may or may not choose to work as a team afterwards

Course Organization Jan 20 Welcome! Review of dynamic programming: 5 problems Jan 27 Lab/Mock contest session: 4 problems Feb 3 Discussion session on geometry problems: 4 problems Feb 10 Lab/Mock contest session: 4 problems Feb 17 Discussion session on graph problems: 4 problems Feb 24 Lab/Mock contest session: 4 problems Mar 3 No class (I'll be out of town – Chattanooga!) Mar 10 Discussion session on misc. algorithms Mar 17 Spring break Mar 24 Mock ACM contest, 9pm – 12:00am, 5 problems Mar 31 Discussion and wrap-up for the semester You may submit problems until the end of exams…CONTEST in San Diego ???

Course webpage references administrative info problem statements and sample data problems you have solved

Grading CS 189 is graded individually... (it’s possible to take it P/F, too) Coding Guidelines problems can be done any time during the semester discussion of algorithms always OK coding should be within teams you may use external references (but not solutions!) one person should take the lead on each problem use /cs/ACM/acmSubmit to submit try things out ! the reason for ACM! though not for CS elective credit…

Problem credits Problems are worth double if You solve them during the 4:15 - 5:30 lab sessions It's one of the "extra difficult" problems, which may be determined as we go… Any standard language is OK -- but do keep in mind that the competition allows only Java, C, and C++. Other "standard" languages: the team gets credit, up to 3 people somewhat reasonable alternatives will also be considered… C#, Python, Ruby Language Choice? Problems are worth triple if they are written up for "the book"

The "book" Overheard at last fall's contest… We will begin a multi-term effort to create an HMC "book" - need to be in Java or C++ a secret weapon? Problems contributed to the book are worth triple, but - need to be beautifully formatted - need to be fully commented - need to be useful for people who did not write it! - variable names and other constructs ~ evident Sign up for a problem if you want to do this. (It's OK to work in a team of 2 or 3, as well.) - need a thorough introductory explanation…

Spring 2008 summary: languages python 82 java 60 C++ 40 Tallies per problem and per language (thus far)… 17 (+2) 8416 (+2) 1 (+1) 6 (+1) 20 (+12) (+2) 3 (+1) (+1) 1 (+1) 17 (+9) (+2) 4 (+2) (+2) 13 (+10) 14 (+9) 121 (+16) (+4) 1115 (+14) number of 2x scores number of 4x scores d 8 ruby 6 scheme 3 lua 2 awk 2 js 2 sql cobol basic x86 asm pascal mathematica sh, latex 1 each

FroshSophsJrsSrsOthers pluto 0pluto 2pluto 3pluto 1 andes 1 andes 0andes 2andes 1 wired 1 wired 0 xenon 1 xenon 0 tenet 1tenet 0 tenet 3tenet 0 clack 2clack 1 clack 0clack 1 grime 1 grime 0 these 0these 1these 0these 4these 1 flour 0flour 2 flour 1 ACM Jotto finale: Fall '08 This has already set the record for the longest jotto game I've played at Mudd!

Dynamic programming!

Excitement from the judges’ room

Backpacks not permitted…

Dynamic programming When a seemingly intractable problem has lots of repeated substructure, go DP! Build a table of partial results. Replace computation with table look-up when possible For example:

Dynamic programming Build a table of partial results. Replace computation with table look-up when possible the binary-decimal problem, for example: Numbers, N, up to 10 6 Input 0 marks the end of the input the smallest decimal multiple of N with only the digits 0 and 1 ! Output Ideas? When a seemingly intractable problem has lots of repeated substructure, go DP!

One way… Count up to the solution, starting from 1… adding digits changes the error (remainder) in predictable ways insight: from CS 60!

Dynamic programming Storing intermediate results in a table for fast look-up: input N = 6 possible remainders upon dividing by N (6) # of digits in answer

input N = 6 possible remainders upon dividing by N (6) # of digits in answer Dynamic programming Storing intermediate results in a table for fast look-up:

input N = 6 possible remainders upon dividing by N (6) # of digits in answer Dynamic programming Storing intermediate results in a table for fast look-up:

input N = 6 possible remainders upon dividing by N (6) # of digits in answer Dynamic programming Storing intermediate results in a table for fast look-up:

input N = 6 possible remainders upon dividing by N (6) # of digits in answer Dynamic programming Storing intermediate results in a table for fast look-up:

DP! Only checking values for which a remainder has not yet been used… Fast

Problem Set #0 (5 problems) Our ACM problems' mascot:

Problem Set #0 (4 problems) In teams of 2~3, read over these first three problems: Where does the structure of the problem depend on similar (but smaller!) substructure? Or not? Think of your next 5-letter jotto word… ! How might you build up a table of values toward an overall solution?

Another example binary-as-decimal problem The "haysale" problem Capacity of our farmer's hay bin Input Output Idea? maximum possible sum <= capacity naïve running time? 24 Number of bales of hay Size of each bale of hay try all possible subsets?

Dynamic programming… Input Capacity size of each bale Idea: keep a table of all possible capacities for bales 1..k bale 1 bale 2 bale 3 bale 4 bale 5 bale 6

Jotto: guesses #1 and 2… SophsJrsSrsGrads A word-guessing game similar to mastermind… ????? Frosh ?????

See you next Tuesday… bring a laptop, if you have one

The ACM regionals seemed to be channeling CS 60 ?!

Dinner…

This weekend's ACM regional programming contest Aaron Pribadi, Stuart Persteiner, and Daniel Lubarov Anak Yodpinyanee + Jason GarretGlaser Kevin Oelze, Andrew Hunter, and Kwang Ketcham Marquis Wang, Josh Ehrlich, and Daniel Fielder

This weekend's ACM regional programming contest Aaron Pribadi, Stuart Persteiner, and Daniel Lubarov Anak Yodpinyanee + Jason GarretGlaser Kevin Oelze, Andrew Hunter, and Kwang Ketcham Marquis Wang, Josh Ehrlich, and Daniel Fielder

HMC details Aaron Pribadi, Stuart Persteiner, and Daniel Lubarov Anak Yodpinyanee + Jason GarretGlaser Kevin Oelze, Andrew Hunter, and Kwang Ketcham Marquis Wang, Josh Ehrlich, and Daniel Fielder

Thanks, Martijn! Scanner sc = new Scanner(System.in); even a bit easier! Martijn is shifty! Martijn is VERY shifty! Where is the table? This sure is sum code… to the max

Pebbles Square array, up to 15x15, of integers from 1 to 99 Input DP Idea consider all possibilities for pebbling each row - they only depend on the previous row's best scores! Subset chosen (pebbles) Row # abc Store the BEST score available for each possible subset.

Square array, up to 15x15, of integers from 1 to 99 Input DP Idea consider all possibilities for pebbling each row - they only depend on the previous row's best scores! Subset chosen (pebbles) Row # abc Store the BEST score available for each possible subset. 0 68x39xx Pebbles

Square array, up to 15x15, of integers from 1 to 99 Input DP Idea consider all possibilities for pebbling each row - they only depend on the previous row's best scores! Subset chosen (pebbles) Row # abc Store the BEST score available for each possible subset. 0 68x39xx xxx Pebbles

Square array, up to 15x15, of integers from 1 to 99 Input DP Idea consider all possibilities for pebbling each row - they only depend on the previous row's best scores! Subset chosen (pebbles) Row # abc Store the BEST score available for each possible subset. 0 68x39xx xxx xxx 0+13 c +13 b +9 a +9 ? running time? What is the best here? Pebbles

binary-as-decimal problem "pebbles" problem (2007 ACM regionals) Square array, up to 15x15, of integers from 1 to 99 Input Output Idea place "pebbles" on integers, trying to maximize total, but no two pebbles may be adjacent… maximum possible sum 572 code Pebbles