APS various problems. Not all bit-strings are compressible. If we have a bit string length n, sometimes we can compress it to a shorter bit string! Here.

Slides:



Advertisements
Similar presentations
Fake coin detection. Fake coins Suppose we have a number of coins, at most one is fake (i.e. either one is fake or none is fake). You have a pair of scales.
Advertisements

COUNTING AND PROBABILITY
Ch. 10: What is a number?. MAIN DEFINITION OF THE COURSE: A symmetry of an object (in the plane or space) means a rigid motion (of the plane or space)
Revision - Surds Production by I Porter
More Number Theory Proofs Rosen 1.5, 3.1. Prove or Disprove If m and n are even integers, then mn is divisible by 4. The sum of two odd integers is odd.
Copyright © Zeph Grunschlag, Counting Techniques Zeph Grunschlag.
CSE115/ENGR160 Discrete Mathematics 02/01/11
Copyright © Zeph Grunschlag,
Tirgul 7. Find an efficient implementation of a dynamic collection of elements with unique keys Supported Operations: Insert, Search and Delete. The keys.
CS 2210 (22C:019) Discrete Structures Logic and Proof Spring 2015 Sukumar Ghosh.
Algebraic Structures: An Activities Based Course MATH 276 UWM MATH 276 UWM.
Lecture for Week Spring.  Numbers can be represented in many ways. We are familiar with the decimal system since it is most widely used in everyday.
Basic Counting. This Lecture We will study some basic rules for counting. Sum rule, product rule, generalized product rule Permutations, combinations.
A few leftover Decrease-and-conquer Algorithms
Methods of Proof. This Lecture Now we have learnt the basics in logic. We are going to apply the logical rules in proving mathematical theorems. Direct.
Lecture 12.  The ISBN 10-digit uses a reverse weighting system: multiply the first digit by 10, the second by 9, the third by 8 and so on until the check.
Chapter 3 Whole Numbers Section 3.6 Algorithms for Whole-Number Multiplication and Division.
CS1Q Computer Systems Lecture 6 Simon Gay. Lecture 6CS1Q Computer Systems - Simon Gay2 Algebraic Notation Writing AND, OR, NOT etc. is long-winded and.
6 Sums of Games.. Lecture6 Admin Plagiarism forms Answer football cup final problem. //Daisy Problem hints e.g. try a smaller size. General problem solving.
Methods of Proof Lecture 3: Sep 9. This Lecture Now we have learnt the basics in logic. We are going to apply the logical rules in proving mathematical.
Copyright © Cengage Learning. All rights reserved. CHAPTER 7 FUNCTIONS.
Reading and Writing Mathematical Proofs Spring 2015 Lecture 4: Beyond Basic Induction.
Barcodes! Felipe Voloch These notes and the barcode program are available at /barcode.html.
Proofs, Induction and Recursion Basic Proof Techniques Mathematical Induction Recursive Functions and Recurrence Relations.
Searching Given distinct keys k 1, k 2, …, k n and a collection of n records of the form »(k 1,I 1 ), (k 2,I 2 ), …, (k n, I n ) Search Problem - For key.
Mathematical Problems & Inquiry in Mathematics AME Tenth Anniversary Meeting May A/P Peter Pang Department of Mathematics and University Scholars.
„Maths In English” Part two. Which mathematical operation is the sum: a)5×25 b)5+25 c)25÷5 d)25-5 Exercise 1.
CS1Q Computer Systems Lecture 6 Simon Gay. Lecture 6CS1Q Computer Systems - Simon Gay2 Algebraic Notation Writing AND, OR, NOT etc. is long-winded and.
Numbers Free powerpoints at
1 Melikyan/DM/Fall09 Discrete Mathematics Ch. 7 Functions Instructor: Hayk Melikyan Today we will review sections 7.3, 7.4 and 7.5.
1 Chapter 2 Pigeonhole Principle. 2 Summary Pigeonhole principle –simple form Pigeonhole principle –strong form Ramsey’s theorem.
CS104:Discrete Structures Chapter 2: Proof Techniques.
Models of Computation: Automata and Formal Languages Sam M. Kim.
Section 1.7. Definitions A theorem is a statement that can be shown to be true using: definitions other theorems axioms (statements which are given as.
Mathematical Proof A domino and chessboard problem.
The Pigeonhole Principle. Pigeonhole principle The pigeonhole principle : If k is a positive integer and k+1 or more objects are placed into k boxes,
Methods of Proof Lecture 4: Sep 20 (chapter 3 of the book, except 3.5 and 3.8)
Notions & Notations - 1ICOM 4075 (Fall 2010) UPRM Department of Electrical and Computer Engineering University of Puerto Rico at Mayagüez Fall 2010 ICOM.
Number Systems. The position of each digit in a weighted number system is assigned a weight based on the base or radix of the system. The radix of decimal.
Unary, Binary, and Beyond Great Theoretical Ideas In Computer Science Steven RudichCS Spring 2003 Lecture 2Jan 16, 2003Carnegie Mellon University.
COUNTING Discrete Math Team KS MATEMATIKA DISKRIT (DISCRETE MATHEMATICS ) 1.
Axioms and Theorems. Remember syllogisms? The Socrates Syllogism All human beings are mortal Socrates is a human being Therefore Socrates is mortal premises.
Sets of Real Numbers (0-2)
CS 2210:0001 Discrete Structures Logic and Proof
Probabilistic Algorithms
CSE15 Discrete Mathematics 02/08/17
Copyright © Zeph Grunschlag,
Direct Proof by Contraposition Direct Proof by Contradiction
Number Systems INTRODUCTION.
Copyright © Zeph Grunschlag,
Gray Code Can you find an ordering of all the n-bit strings in such a way that two consecutive n-bit strings differed by only one bit? This is called the.
Public Key Cryptosystems - RSA
Together, rational numbers and irrational numbers form this set.
CH 9.2 : Hash Tables Acknowledgement: These slides are adapted from slides provided with Data Structures and Algorithms in C++, Goodrich, Tamassia and.
Basic Counting.
COUNTING AND PROBABILITY
Fundamentals of Data Representation
CS 220: Discrete Structures and their Applications
CH 9.2 : Hash Tables Acknowledgement: These slides are adapted from slides provided with Data Structures and Algorithms in C++, Goodrich, Tamassia and.
Surds.
Functions Rosen 2.3, 2.5 f( ) = A B Lecture 5: Oct 1, 2.
Chapter 16: Check Digit Systems, Continued
Mathematics (9-1) - iGCSE
Foundations of Discrete Mathematics
Copyright © Zeph Grunschlag,
Copyright © Zeph Grunschlag,
Examples of Mathematical Proof
Using different numbers
Presentation transcript:

APS various problems

Not all bit-strings are compressible. If we have a bit string length n, sometimes we can compress it to a shorter bit string! Here we will use the pigeon hole principle to show that it is not possible to compress all bit strings. There are 2^{n} bit strings of length n, but only 2^{n}-1 bit strings of length n-1. Therefore there is one more bit string of length n, than there are bit string of length n-1.

One way Roads Problem. In one country every city is connected to every other city by a road. There is too much traffic so the government decides to make all the roads one way. Show that there is a city (we can call it the capital city), which can be reached from all other cities directly, or indirectly by passing at most one other city. Let’s draw a few examples to illustrate this.

Two marbles problem. You have two marbles. You wish to know from which floors of a high building it is safe to drop a marble from so it will not break, and what floor it will break. What is the best strategy. Make all reasonable assumptions e.g. a marble either shatters or it does not (i.e. it does not chip a little bit on each drop). Hint – binary search is tempting but incorrect.

The ISBN code – example of mod. Every recent book has a International Standard Book Number (ISBN). Example First digit = 0 = English Next 2 digits = publisher Next 6 digits = book number Final digit is check ∑id i = 0 mod 11. Weighted check sum.

The ISBN code 2. If the weighted check sum = 10 then we write an X as a single character instead. The ISBN code is designed to detect A) any single error B) any double-error created by the transposition of two digits. If the weighted check sum ≠ 0 then we have detected an error.

Linked Chain Problem We have 4 chains each of 3 links. Connect all the chains together into a loop with the minimum number of operations. An operation is opening and closing a link.

Map of London Problem You are in London and you have a map of London. You place the map on the ground. Prove that there is a point on the map which is directly above the corresponding point in London.

Another Proof of Incompressibility Last time we saw that not all bit strings are compressible – because there are not enough shorter bit strings! This was an application of the pigeon hole principle. Alternatively, imagine we have a compression program, and we compress a string, and then we compress the compressed string, and repeat – eventually we will get 0 or 1!!!

The Square Root of 2 is Irrational. A classic proof by contradiction from mathematics is the. If it were rational, it could be expressed as a fraction a/b in lowest terms, where a and b are integers, at least one of which is odd. But if a/b = √2, then a 2 = 2b 2. Therefore a 2 must be even. Because the square of an odd number is odd, that in turn implies that a is even. This means that b must be odd because a/b is in lowest terms.

The Square Root of 2 is Irrational. On the other hand, if a is even, then a 2 is a multiple of 4. If a 2 is a multiple of 4 and a 2 = 2b 2, then 2b 2 is a multiple of 4, and therefore b 2 is even, and so is b. So b is odd and even, a contradiction. Therefore the initial assumption—that √2 can be expressed as a fraction—must be false.

A different proof a/b = √2, then a 2 = 2b 2 {take a function of both sizes}. exp(a 2 )= exp(2b 2 ) {exp.k is the number of times 2 divides k notable exp.2=1 and exp nm = exp.n+exp.m} 1+2.exp.n = 2.exp.m {an odd number cannot equal an even number} Therefore false.

Revision of Fake Coins Again We have a set of coins – one may be fake. When we weight the coins – we can put them in three places – left, right, table. If they do not balance – then we can discard the coins on the table – but we have also learnt something about the coins on the scales (possibly heavier or possibly lighter)

Bugs Problem Four bugs are at the corners of a square. The each begin to chase each other (along the sides). What is the invariant here? How far do they walk before the catch each other?

Birthday Problem 1 What is the probability two people share the same birthday? How many people do we need in a room so there is a 50% probability that a pair of people share a birthday.

Birthday Problem 2 What is the probability that at least one person shares the same birthday as me? How many people do we need in a room so there is a 50% probability that a pair of people share a birthday.