Measuring With Jugs A Solution in Finite Domain. Intro to Oz * variables -- a set of alphanumeric characters starting with a CAPITAL letter * atoms --

Slides:



Advertisements
Similar presentations
Andrew C. Samuels, Information Technology Specialist Trainer c/o Ministry of Education Mona High School, Kingston, Jamaica 1 Problem Solving Section 2:
Advertisements

A Level Computing#BristolMet Session Objectives#U2 S2 MUST describe the steps of an algorithm using a program flowchart SHOULD explain the data types and.
COS 320 Compilers David Walker. Outline Last Week –Introduction to ML Today: –Lexical Analysis –Reading: Chapter 2 of Appel.
Strings Testing for equality with strings.
1 Logic Programming. 2 A little bit of Prolog Objects and relations between objects Facts and rules. Upper case are variables. parent(pam, bob).parent(tom,bob).
CS324e - Elements of Graphics and Visualization A Little Java A Little Python.
Chapter 2 Review Questions
Hand Crafting your own program By Eric Davis for CS103.
© Janice Regan Problem-Solving Process 1. State the Problem (Problem Specification) 2. Analyze the problem: outline solution requirements and design.
Lecture 4 More Examples of Karnaugh Map. Logic Reduction Using Karnaugh Map Create an Equivalent Karnaugh Map Each circle must be around a power of two.
CS 112 Intro to Computer Science II Sami Rollins Fall 2006.
Some basic I/O.
CS 112 Intro to Computer Science II Sami Rollins Spring 2007.
Lecture Notes 1/21/04 Program Design & Intro to Algorithms.
Measuring With Jugs A Solution in Finite Domain. Intro to Mozart - Oz variables -- a set of alphanumeric characters statring with a CAPITOL letter – you.
1 Chapter 2: Elementary Programming Shahriar Hossain.
Moving To Code 3 More on the Problem-Solving Process §The final step in the problem-solving process is to evaluate and modify (if necessary) the program.
Introducing Java.
© The McGraw-Hill Companies, 2006 Chapter 1 The first step.
Introduction to Programming Prof. Rommel Anthony Palomino Department of Computer Science and Information Technology Spring 2011.
DEDUCTIVE DATABASE.
Instructor: Alexander Stoytchev CprE 185: Intro to Problem Solving (using C)
Chapter 5 - Writing a Problem Domain Class Definition1 Chapter 5 Writing a Problem Domain Class Definition.
Programming.
Chapter 2 Primitive Data Types and Operations F Introduce Programming with an Example  The MyInput class F Identifiers, Variables, and Constants F Primitive.
1 Chapter 2 Primitive Data Types and Operations F Introduce Programming with an Example  The MyInput class F Identifiers, Variables, and Constants F Primitive.
Mastering Char to ASCII AND DOING MORE RELATED STRING MANIPULATION Why VB.Net ?  The Language resembles Pseudocode - good for teaching and learning fundamentals.
JAVA JAVA is an object-oriented programming (OOP) language introduced by Sun Microsystems in In the Java programming language: A program is made.
Measuring With Jugs A Solution in Finite Domain. Outline The Puzzle The Algorithm Introduction to Oz3 Implementation in Oz3.
 JAVA Compilation and Interpretation  JAVA Platform Independence  Building First JAVA Program  Escapes Sequences  Display text with printf  Data.
Chapter 1 Object Orientation: Objects and Classes.
Programming Test #1 Solutions. Multiple Choice 1. B) the grammar of the coding language 2. C) String 3. A) Single 4. C) 2Burgers4Me 5. B) Design Time.
CS412/413 Introduction to Compilers Radu Rugina Lecture 4: Lexical Analyzers 28 Jan 02.
Primitive Variables.
Property of Jack Wilson, Cerritos College1 CIS Computer Programming Logic Programming Concepts Overview prepared by Jack Wilson Cerritos College.
Lesson 6. Python 3.3 Objectives. In this lesson students will learn how to output data to the screen and request input from the user. Students will also.
CPS 506 Comparative Programming Languages Syntax Specification.
The character data type char. Character type char is used to represent alpha-numerical information (characters) inside the computer uses 2 bytes of memory.
Primitive Variables.
Documentation and Style. Documentation and Comments  Programs should be self-documenting.  Use meaningful variable names.  Use indentation and white.
Data,information Data and Information 4 Data –Raw, unorganised facts –Ideas or concepts 4 Information –When data is manipulated into a meaningful form.
1 MATERI PENDUKUNG TIPE DATA Matakuliah: M0074/PROGRAMMING II Tahun: 2005 Versi: 1/0.
Values, Types, and Variables. Values Data Information Numbers Text Pretty much anything.
 Variables can store data of different types, and different data types can do different things.  PHP supports the following data types:  String  Integer.
9.1 Sequences and Series. Definition of Sequence  An ordered list of numbers  An infinite sequence is a function whose domain is the set of positive.
Data Handling in Algorithms. Activity 1 Starter Task: Quickly complete the sheet 5mins!
Declaring variables The type could be: int double char String name is anything you want like lowerCaseWord.
Instructor: Alexander Stoytchev CprE 185: Intro to Problem Solving (using C)
Overview of Compilation Prepared by Manuel E. Bermúdez, Ph.D. Associate Professor University of Florida Programming Language Principles Lecture 2.
Chapter 2 Variables and Constants. Objectives Explain the different integer variable types used in C++. Declare, name, and initialize variables. Use character.
Midterm preview.
Compilers Principles, Techniques, & Tools Taught by Jing Zhang
Chapter 2 Variables.
CIS3931 – Intro to JAVA Lecture Note Set 2 17-May-05.
More Events.
Fill the screen challenge!
An Introduction to Java – Part I, language basics
Unit-1 Introduction to Java
Chapter 2 Variables.
Class Examples.
Intro to Programming & Algorithm Design
Documentation and Style
Exercise Solution First questions What's output What's input
Chapter 1 The Science of Biology.
Java for Beginners University Greenwich Computing At School DASCO
Compilers Principles, Techniques, & Tools Taught by Jing Zhang
Chapter 2 Variables.
Chapter 2 Primitive Data Types and Operations
Boolean in C++ CSCE 121.
Variables and Constants
Presentation transcript:

Measuring With Jugs A Solution in Finite Domain

Intro to Oz * variables -- a set of alphanumeric characters starting with a CAPITAL letter * atoms -- set of alphanumeric characters beginning with a lower case letter (anAtom in would be equivalent in Java to"anAtom") * keywords – declare, fun, Browse

Other Neat Stuff -- virtual strings -- virtual stringsa#b#c -- lists -- lists [a b c] [a b c] -- records -- records sol(A B C) #(a b c) #(a b c)

Functions This is what an Oz Program looks like:

The Algorithm background -- others who have analyzed it explanation CapA*TimesA-CapA*TimesANeg

Constraint Programming + finite domain integers + constraints + how it works (as opposed to logic programming like Prolog)

Constraint Programming Applied Algorithm to Code - 2 jugs - n jugs - show output - explain output numbers CapA*TimesA-CapA*TimesANeg

Numbers to Operations + show structure of functions + show code bits + show output

Multiple Solutions May include this!

Conclusion This shows that Finite Domain Constraint Programming is useful for areas where it might not at first seem useful.