18 April 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Formal.

Slides:



Advertisements
Similar presentations
Data Structures Through C
Advertisements

18 April 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Formal.
Chapter 3: Lists, Operators, Arithmetic Part 1. Outline Representation of lists Some operations in lists Operator notation Arithmetic.
Formal Methods in Software Engineering
PDR Process Level B and C. UC PERFORMANCE & DEVELOPMENT REVIEW 2009 – Academic Staff Staff member preparation (Academic staff) Supervisor preparation.
Lesson 1.3 Unit 1, Lesson 3. Set:A collection of distinct objects Elements:All of the objects that make up a set.
Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Software Systems.
12 April 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Introduction.
25 February 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department.
22 March 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Introduction.
13 May 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Introduction.
12 April 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Formal.
Functional Programming. Pure Functional Programming Computation is largely performed by applying functions to values. The value of an expression depends.
04 March 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Introduction.
Instructore: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Concurrent and.
08 March 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Introduction.
1 Introduction to Computability Theory Lecture3: Regular Expressions Prof. Amos Israeli.
Sequences. What is sequence? A sequence is an ordered collection of objects. We use sequences to model collections in which order or multiplicity is important.
Chapter 3: Formal Translation Models
Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Software Systems.
13 May 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Formal.
10 May 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Formal.
01 March 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Introduction.
22 March 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Formal.
Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Object Oriented.
Instructore: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Concurrent and.
12 April 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Formal.
Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Object Oriented.
Min Chen School of Computer Science and Engineering Seoul National University Data Structure: Chapter 1.
0 REVIEW OF HASKELL A lightening tour in 45 minutes.
University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Introduction to computer vision Chapter 2: Image.
1 Chapter Elementary Notions and Notations.
Construction Techniques (1) - 1ICOM 4075 (Fall, 2010) UPRM Department of Electrical and Computer Engineering University of Puerto Rico at Mayagüez 2005.
Elements of Combinatorics (Continuation) 1. Pigeonhole Principle Theorem. If pigeons are placed into pigeonholes and there are more pigeons than pigeonholes,
17 May 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Formal.
08 April 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Formal.
University of Palestine software engineering department Testing of Software Systems Program Inspections, Walkthroughs, and Reviews instructor: Tasneem.
1 April 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Formal.
Instructore: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Concurrent and.
Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Software Systems.
03 May 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Introduction.
CS535 Programming Languages Chapter - 10 Functional Programming With Lists.
School of Computer Science, The University of Adelaide© The University of Adelaide, Control Data Flow Graphs An experiment using Design/CPN Sue Tyerman.
Math 30-2 Probability & Odds. Acceptable Standards (50-79%)  The student can express odds for or odds against as a probability determine the probability.
Aim: What is the counting rule? Exam Tomorrow. Three Rules Sometimes we need to know all possible outcomes for a sequence of events – We use three rules.
Three Apple engineers and three Microsoft employees are traveling by train to a conference. train.
© ART 2012 TWS. © ART 2012  Provide an easy-to-use system to manage key information about train movements through the network  Manage track workers.
Module #10: Proof Strategies Rosen 5 th ed., §3.1 (already covered)
Chapter 8: Part 3 Collections and Two-dimensional arrays.
Review Functions. Function A function is a special type of relation in which each element of the domain is paired with exactly one element of the range.
Based on Rosen, Discrete Mathematics & Its Applications, 5e Prepared by (c) Michael P. Frank Modified by (c) Haluk Bingöl 1/18 Module.
Deterministic Finite-State Machine (or Deterministic Finite Automaton) A DFA is a 5-tuple, (S, Σ, T, s, A), consisting of: S: a finite set of states Σ:
Functional Programming
Scalars and Vectors.
A lightening tour in 45 minutes
PROGRAMMING IN HASKELL
PROGRAMMING IN HASKELL
B (The language of B-Method )
VCU, Department of Computer Science CMSC 302 Sequences and Summations Vojislav Kecman 9/19/2018.
Rosen 5th ed., §3.2 ~9 slides, ~½ lecture
Advanced Algorithms Analysis and Design
CSCE 314: Programming Languages Dr. Dylan Shell
Rosen 5th ed., §3.2 ~9 slides, ~½ lecture
PROGRAMMING IN HASKELL
Discrete Mathematics and its Applications
Exercise Give the domain and range of the following relation.
Queues Lecture 30 Fri, Apr 2, /3/2019 Queues.
2.1: Relations and Functions
Vectors Tip or head: D Tail: C
3-5 Working with Sets.
Presentation transcript:

18 April 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Formal Methods Sequences

18 April 2009Instructor: Tasneem Darwish2 Outlines Sequence notation A model for sequences Functions on sequences Structural induction Bags

18 April 2009Instructor: Tasneem Darwish3 Sequence notation A sequence is an ordered collection of objects If there are no objects in the collection, the sequence is the empty sequence, and it is written as The expression denotes the sequence containing objects a, b, and c, in that order Concatenation is when two sequences are combined in such a way that the elements of one follow the elements of the other, and order is maintained Example: If s and t are sequences, we write s ̑ t to denote the concatenation of s and t

18 April 2009Instructor: Tasneem Darwish4 Sequence notation Example 9.1 The ticket office in a railway station has a choice of two counters at which tickets may be purchased. There are two queues of people, one at each counter; these may be modelled as sequences To restrict elements of a sequence we can use the filter operator if s is a sequence, then is the largest subsequence of s containing only those objects that are elements of the set A Note: The order and multiplicity of elements must be preserved

18 April 2009Instructor: Tasneem Darwish5 Sequence notation Example 9.2 In the station, there is a destination board displaying a list of trains, arranged in order of departure. This may be modelled as a sequence of pairs, each recording a time and a destination Sally is interested only in those trains that are going to London;

18 April 2009Instructor: Tasneem Darwish6 Sequence notation To refer to the first element of a sequence, or to the part of the sequence that follows the first element; these are called the head and tail, respectively Notice that the head of a sequence is an element, while the tail is another sequence. If s is any non-empty sequence

18 April 2009Instructor: Tasneem Darwish7 Sequence notation Example 9.3 Sally wants to take the first train to London. From the list of trains on the destination board Tim is still waiting to buy a ticket, and the first train is about to leave, then the list of available trains is given by `tail trains', the sequence

18 April 2009Instructor: Tasneem Darwish8 Sequence notation if s is a sequence, then we write `#s' to denote the length of s. For example Example 9.4 The total number of trains on the destination board is given by and the total number of trains to London is given by flattening is to map a sequence of sequences to a single sequence; For example,