ES 314 Advanced Programming Instructors: B. Ravikumar J. Agrawal A.Kojoory Department of Engg Science.

Slides:



Advertisements
Similar presentations
CS 225 Lab #11 – Skip Lists.
Advertisements

CS 1031 Recursion (With applications to Searching and Sorting) Definition of a Recursion Simple Examples of Recursion Conditions for Recursion to Work.
Solving IPs – Cutting Plane Algorithm General Idea: Begin by solving the LP relaxation of the IP problem. If the LP relaxation results in an integer solution,
Lab Assignment 1 COP 4600: Operating Systems Principles Dr. Sumi Helal Professor Computer & Information Science & Engineering Department University of.
Randomized Algorithms Randomized Algorithms CS648 Lecture 3 Two fundamental problems Balls into bins Randomized Quick Sort Random Variable and Expected.
Introductory Computer Science Courses Past experiences & thoughts Haakon Ringberg, Thomson Research Paris & Princeton University.
CSE332: Data Abstractions Lecture 27: A Few Words on NP Dan Grossman Spring 2010.
1 CMSC 132: Object-Oriented Programming II Software Development II Department of Computer Science University of Maryland, College Park.
DAST, Spring © L. Joskowicz 1 Data Structures – LECTURE 1 Introduction Motivation: algorithms and abstract data types Easy problems, hard problems.
Data Structures & Algorithms What The Course Is About s Data structures is concerned with the representation and manipulation of data. s All programs.
Components and Organization of Discrete-event Simulation Model
Chapter 8 Loops while loop syntax while ;... end;.
General Computer Science for Engineers CISC 106 Lecture 08
Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company, for the United States Department of Energy under contract.
CS503: Tenth Lecture, Fall 2008 Review Michael Barnathan.
Fuzzy Evolutionary Algorithm for VLSI Placement Sadiq M. SaitHabib YoussefJunaid A. Khan Department of Computer Engineering King Fahd University of Petroleum.
Module C9 Simulation Concepts. NEED FOR SIMULATION Mathematical models we have studied thus far have “closed form” solutions –Obtained from formulas --
Chapter 2: Algorithm Discovery and Design
13-7 Modeling Randomness.
DAST, Spring © L. Joskowicz 1 Data Structures – LECTURE 1 Introduction Motivation: algorithms and abstract data types Easy problems, hard problems.
Chapter 8 Loops while loop syntax while ;... end;.
CS 202, Spring 2003 Fundamental Structures of Computer Science II Bilkent University1 Sorting - 3 CS 202 – Fundamental Structures of Computer Science II.
ALGORITHM ANALYSIS AND DESIGN INTRODUCTION TO ALGORITHMS CS 413 Divide and Conquer Algortihms: Binary search, merge sort.
WEEK 1 CS 361: ADVANCED DATA STRUCTURES AND ALGORITHMS Dong Si Dept. of Computer Science 1.
HOW TO SOLVE IT? Algorithms. An Algorithm An algorithm is any well-defined (computational) procedure that takes some value, or set of values, as input.
Lecture No.01 Data Structures Dr. Sohail Aslam
Mathematics in Computer Science at Loras College Steve Mosiman.
Chapter 2: Algorithm Discovery and Design Invitation to Computer Science, C++ Version, Third Edition.
Circuit Construction Kit Projectile Motion Simulator.
Forensics and CS Philip Chan. CSI: Crime Scene Investigation high tech forensics tools DNA profiling Use.
DATA STRUCTURES (CS212D) Week # 1: Overview & Review.
SEARCHING. Vocabulary List A collection of heterogeneous data (values can be different types) Dynamic in size Array A collection of homogenous data (values.
CSE 326: Data Structures NP Completeness Ben Lerner Summer 2007.
CS 140 Computer Programming (I) Second semester (3 credits) Imam Mohammad bin Saud Islamic University College of Computer Science and Information.
The Balance Between Theoretical and Practical Work Within Electrical and Computer Engineering Courses Dr. Bahawodin Baha March Development Partnerships.
1 CSC 222: Computer Programming II Spring 2004 See online syllabus at: Course goals:
Instructor: Dema Alorini Database Fundamentals IS 422 Section: 7|1.
40S Applied Math Mr. Knight – Killarney School Slide 1 Unit: Matrices Lesson: MAT-5 Transitions Transition Problems Learning Outcome L-4 MAT-L5 Objectives:
Major objective of this course is: Design and analysis of modern algorithms Different variants Accuracy Efficiency Comparing efficiencies Motivation thinking.
Simple Iterative Sorting Sorting as a means to study data structures and algorithms Historical notes Swapping records Swapping pointers to records Description,
CS Data Structures I Chapter 2 Principles of Programming & Software Engineering.
Probabilistic Verification of GBN Group Members: Lin Huang(lh2647), Yuechen Qin(yq2158), Xi Chen(xc2257), Runxi Zhou(rz2286), Shuang Zhang(sz2426) 04/08/2014.
Forensics and CS Philip Chan. CSI: Crime Scene Investigation high tech forensics tools DNA profiling Use.
Introduction to Loops For Loops. Motivation for Using Loops So far, everything we’ve done in MATLAB, you could probably do by hand: Mathematical operations.
Analysis of Algorithms CS 477/677 Instructor: Monica Nicolescu Lecture 7.
Program Design. The design process How do you go about writing a program? –It’s like many other things in life Understand the problem to be solved Develop.
UNISSENSE MARKET PLACE Websites: Registered in United Kingdom (England), London The Future is Today …
1 Mathematical Expectation Mathematical Expectation Ernesto Diaz, Mathematics Department Redwood High School.
Iconic Programmer A Visualization Tool for Teaching Concepts without Context.
Computer Science/Ch. Algorithmic Foundation of CS 4-1 Chapter 4 Chapter 4 Algorithmic Foundation of Computer Science.
Decision Maths 1 Shortest path algorithm Dijkstra’s Algorithm A V Ali :
 Simulation enables the study of complex system.  Simulation is a good approach when analytic study of a system is not possible or very complex.  Informational,
Gar-Field HS How do we compare?. GFHS Computer Science courses Computer Math (CM) Visual Basic Not a weighted class Introduction to CS and Programming.
Chapter 2: Algorithm Discovery and Design Invitation to Computer Science.
CSC 413/513: Intro to Algorithms Hash Tables. ● Hash table: ■ Given a table T and a record x, with key (= symbol) and satellite data, we need to support:
Gaussian Mixture Model classification of Multi-Color Fluorescence In Situ Hybridization (M-FISH) Images Amin Fazel 2006 Department of Computer Science.
Advanced Higher Computing Science The Project. Introduction Worth 60% of the total marks for the course Must include: An appropriate interface using input.
Genetic Algorithm(GA)
CS 2130 Computational Structures (Discrete Mathematics for Computing)
COP 3503 FALL 2012 Shayan Javed Lecture 15
CS 315 Data Structures B. Ravikumar Office: 116 I Darwin Hall Phone:
Phase transition in the Countdown problem
Write less; please more pictures!
MyBoundless Boundless Customer Portal
Objective of This Course
Design and Analysis of Algorithms
Cooperative & Experiential Education
RANDOM NUMBERS SET # 1:
Presentation transcript:

ES 314 Advanced Programming Instructors: B. Ravikumar J. Agrawal A.Kojoory Department of Engg Science

2 Prerequisite: CS 115: Programming I. Co-requisites: MATH 345: Probability Theory and ES 220: Electric Circuits, or consent of instructor. Programming is central to Engineering modeling and simulation are central to engineering programming is a crucial component of modeling and simulation

3 Course will have two modules programming data structures features of c++ programming Objects and classes Pointers, recursion etc. some fundamental algorithms sorting searching simulation and modeling

4 Example of modeling and simulation A soft drink company offers a promotional award. Each can of the soft drink contains a sticker with a number from 1 to 20. Once you have collected all the different stickers, you can mail it and receive a prize. Assume that the sticker labels are randomly generated integers from 1 to 20, what is the average number of cans one should buy in order to win the prize?

5 What tools do we need to solve this problem? entities to be simulated can, buyer can random number generator buyer keep track of the stickers currently owned, number of cans bought so far simulation stop when all stickers collected

6 Details of the solution General solution: k stickers {1, 2, …, k} class buyer: Data: stickers – array of size k numCans – number of cans bought Functions: buy – will make the buyer buy one more can. Update stickers and numCans done – check if the buyer owns all the stickers.

7 Overall solution total = 0; for j = 1 to N { // repeat the simulation N times initialize a buyer A; // stickers[] array is set to all 0; numCans is set to 0; while !(A.done) A.buyCan(); total = total + A.numCans; } Output total / N;