25-SetTopicsApps

25-SetTopicsApps - Discussion #25 Chapter 5, Sections...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Discussion #25 Chapter 5, Sections 2.3-3.3 1/13 Discussion #25 Set Topics & Applications Discussion #25 Chapter 5, Sections 2.3-3.3 2/13 Topics • Sequences • Strings • Power Sets • Types • Relations definitions & representations Discussion #25 Chapter 5, Sections 2.3-3.3 3/13 Sequences • Ordered list of elements from a set A – The sequence is said to be over A. – Repetitions of elements are allowed. – A sequence of length n is an n-tuple . • Delimited by angle brackets – e.g. <a,b,c>, <a,c,b,a,b,d> – Empty sequence < > – Infinite sequence <1,1,2,2,1,1,2,2,1,1, …> Discussion #25 Chapter 5, Sections 2.3-3.3 4/13 Formal Notation for Sequences • Alphabet A • Cross-product notation – A × A = A 2 – A × … × A = A n • Set of all nonempty sequences over A – Of length ≤ n: A 1 ∪ A 2 ∪ … ∪ A n – Of any length: A 1 ∪ A 2 ∪ … = A + – Including empty: A ∪ A 1 ∪ … = A * , where A = < > Discussion #25 Chapter 5, Sections 2.3-3.3 5/13 Strings • Strings – Sequences of characters are called strings. – The set of characters over which a string is formed is called an alphabet. – Normally we omit the commas and use quotes: <a,b,c,a> = 'abca' • Concatenation ( ,+) – Examples: • <1,3,5> <2,3,3,> = <1,3,5> + <2,3,3,> = <1,3,5,2,3,3> • 'ab' 'ca' = 'ab' + 'ca' = 'abca' – Concatenation is not commutative....
View Full Document

This note was uploaded on 03/02/2012 for the course C S 236 taught by Professor Michaelgoodrich during the Winter '12 term at BYU.

Page1 / 13

25-SetTopicsApps - Discussion #25 Chapter 5, Sections...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online