Inclusion-Exclusion Principle. 3 sets A,B,C A B C |A ˘ B ˘ C| = |A| + |B| + |C| -|A*B|-|A*C|-|B*C| +|A*B*C| *: intersection A*B A*C B*C |A ˘ B ˘ C| =

Slides:



Advertisements
Similar presentations
Geometry with TI-Nspire™ Technology
Advertisements

Software Testing and Quality Assurance
Integer Square Root. Integer square roots 4 n Definition: given an integer x>=0, the integer square root (isr) is the largest integer whose square does.
Karlstad University Computer Science Design Contracts and Error Management Design Contracts and Errors A Software Development Strategy (anpassad för PUMA)
1 Advanced Material The following slides contain advanced material and are optional.
NFA- to NFA conversion. Purpose This presentation presents an example execution of the algorithm which takes as input an NFA with -transitions and produces.
Goals for Art. Instruction Planning To teach students basic fundamentals of art and design. To supply students with a creative outlet where they can determine.
CS 261 – Data Structures Preconditions, Postconditions & Assert.
Objectives The student will be able to: Factor using the greatest common factor (GCF). SOL: A.2c Designed by Skip Tyler, Varina High School.
EXAMPLE 1 Standardized Test Practice SOLUTION Let ( x 1, y 1 ) = ( –3, 5) and ( x 2, y 2 ) = ( 4, – 1 ). = (4 – (–3)) 2 + (– 1 – 5) 2 = = 85 (
Similar Figures Notes. Solving Proportions Review  Before we can discuss Similar Figures we need to review how to solve proportions…. Any ideas?
Assessment Design. Four Professional Learning Modules 1.Unpacking the AC achievement standards 2.Validity and reliability of assessments 3. Confirming.
How to Write Lesson Plan Using the Cooperative Group Instructional Model.
NU ACM Talk Virtual Scientific Communities for Driving Innovation and Learning Karl Lieberherr joint work with Ahmed Abdelmeged and Bryan Chadwick 12/21/20151SCG.
13 Aug 2013 Program Verification. Proofs about Programs Why make you study logic? Why make you do proofs? Because we want to prove properties of programs.
Gmail and Hotmail.  2 4  16 runs  1-10 rating  Average rating used as response.
Building Communities of Teaching and Learning Through Technology Hope Hartman and Campbell Dalglish, CCNY CUNY General Education Conference May 4, 2007.
Chapter 2 Comments, Conditions, Assertions Comments Preconditions Postconditions Assertions.
EECS 270 Lecture 10. K-map “rules” – Only circle adjacent cells (remember edges are adjacent!) – Only circle groups that are powers of 2 (1, 2,
Chapter 7 Programming by contract: preconditions and postconditions.
Loop Invariants and Binary Search Chapter 4.4, 5.1.
1.3 Segments and Measure The segment postulate Distance Formula.
Designing a Speaking Task Workshop  Intended learning outcomes  Definition of a task  Principles of second language acquisition  Principles of developing.
Computer Hardware. 11 th Class Computer Office Application-1 Computer Hardware Md. Jamirul Islam Assistant Professor Computer Monwara Azmat Ali College,
Program Design & Development EE 201 C7-1 Spring
Digital Logic Design. Truth Table  Logic Circuit 1. Start with truth table 2. When your output is a 1, figure out the combination of inputs, ANDs, and.
CRJ 303 Week 3 Assignment Juvenile Corrections Check this A+ tutorial guideline at
CRJ 303 Week 4 Assignment Life As A Correctional Officer Check this A+ tutorial guideline at
EDL 535 Week 5 DQ 1 What are the major principles of IDEA? Check this A+ tutorial guideline at 535/EDL-535-Week-5-DQ-1.
8.2A Factoring using Distributive Property
Problem G-1 Schyler Fennimore.
Topics: jGRASP editor ideosyncrasies assert debugger.
Algebra substitution.
Boolean Expressions Lecture No. 10.
تصنيف التفاعلات الكيميائية
إستراتيجيات ونماذج التقويم
Chapter 8: Sorting in Linear Time
The General Triangle C B A.
Constructing a Triangle
Princess Sumaya University
Математици-юбиляри.
Objectives The student will be able to:
Objectives The student will be able to:
Bell Ringer 10/27/10 What is the GCF? 18x³y² and 24x² ab and a³b².
Milestone Two Medtronic.
Math 20-1 Chapter 7 Absolute Value and Reciprocal Functions
Evaluating Logarithms
Evaluating Language Learning Technology
The General Triangle C B A.
Question 10.
0 = 0 (ground state, no internal energy), 1 2 = 2·1 3 = 3·1
Objectives The student will be able to:
Chapter 8: Sorting in Linear Time
Example: Assume that you have 3 molecules. Each molecule has 4 possible energy states: 0 = 0 (ground state, no internal energy), 1, 2 = 21; 3 = 31.
Polygons: Inscribed and Circumscribed
CSE 1020:Software Development
1. Evaluating Expressions and Functions
Factoring using the greatest common factor (GCF).
GEOMETRICAL CONSTRUCTIONS
Recall Retrieved from:
Objectives The student will be able to:
Objectives The student will be able to:
7–8 Altitudes of Triangles
Pythagoras theorem statement
Objectives The student will be able to:
Which of the ensemble states in the table with our example will come
Example: Assume that you have 3 molecules. Each molecule has 4 possible energy states: 0 = 0 (ground state, no internal energy), 1, 2 = 21; 3 = 31.
FACTORIAL EXPERIMENTATION JMP EXAMPLE
Production of Goods and Services. Production - is a process of combining various material inputs and immaterial inputs (plans, know-how) in order to make.
Properties of Numbers Review Problems.
Presentation transcript:

Inclusion-Exclusion Principle

3 sets A,B,C A B C |A ˘ B ˘ C| = |A| + |B| + |C| -|A*B|-|A*C|-|B*C| +|A*B*C| *: intersection A*B A*C B*C |A ˘ B ˘ C| = +3 |A| + |B| + |C| -3 -|A*B|-|A*C|-|B*C| +1 +|A*B*C| -- 1 |A ˘ B ˘ C| = +2 |A| + |B| + |C| -1 -|A*B|-|A*C|-|B*C| +|A*B*C| -- 1

Your Programming Assignments Input f in F satisfying precondition Output g in G satisfying postcondition Claims about your program p: F -> G: – Correctness – Resource consumption Time: 100. Space: <= 10 Energy – Quality of G: 0.6

Programming Assignments Further claims about your program p: F -> G: – Well designed Follows well accepted design guidelines

Evaluating Programming Assignments Run them on a benchmark provided by the teaching assistant / professor. Run them on all test cases provided by other students. Reward students whose test cases find bugs in programs of other students. Good idea! Increases interaction. What about checking resource consumption and quality claims? Require that they are stated explicitly as part of the submission.

Hypotheses I claim that my program p:F->G is correct for all inputs satisfying the precondition and it operates with resource consumption R and achieves quality Q. I claim that my sorting program is correct for all inputs of size n < 10^6 and it makes at most n*log(log(n)) comparisons.