Internet Engineering Czesław Smutnicki Discrete Mathematics – Combinatorics.

Slides:



Advertisements
Similar presentations
Hybrid Infrared and Visible Light Projection for Location Tracking
Advertisements

Abdullah Said Alkalbani University of Buraimi
Date of Birth Design Problem
Counters and Registers
Looking Inside the Black Box
1 X-10 Beyond the Basics EH-Expo, S20, Cell #A Good Afternoon!!! Good Afternoon!!! Welcome to the class. EH-Expo Way X-10 & Intro to Extended Code!
CSE 370 Sample Final Exam Questions. 1) Logic Minimization CD AB F = Σm(0,6,7,8,9,11,15) + d(1,13)
- 1 - Using an SMT Solver and Craig Interpolation to Detect and Remove Redundant Linear Constraints in Representations of Non-Convex Polyhedra Christoph.
Register Transfer and Microoperations Part2
6.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 2 Data Encryption Standard (DES)
Slide 1 Insert your own content. Slide 2 Insert your own content.
Principles & Applications
Automatic Projector Calibration with Embedded Light Sensors
Copyright © 2001 Nominum, Inc. IPv6 DNS Ashley Kitto Nominum, Inc.
Fast Algorithms for Finding Nearest Common Ancestors Dov Harel and Robert Endre Tarjan Fast Algorithms for Finding Nearest Common Ancestors SIAM J. COMPUT.
Combining Like Terms. Only combine terms that are exactly the same!! Whats the same mean? –If numbers have a variable, then you can combine only ones.
0 - 0.
DIVIDING INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
MULTIPLYING MONOMIALS TIMES POLYNOMIALS (DISTRIBUTIVE PROPERTY)
SUBTRACTING INTEGERS 1. CHANGE THE SUBTRACTION SIGN TO ADDITION
MULT. INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
Addition Facts
Binary Numbers.
8 October 2013Birkbeck College, U. London1 Introduction to Computer Systems Lecturer: Steve Maybank Department of Computer Science and Information Systems.
15 October 2013Birkbeck College, U. London1 Introduction to Computer Systems Lecturer: Steve Maybank Department of Computer Science and Information Systems.
1 Floating Point Representation and Arithmetic (see Patterson Chapter 4)
A Simple ALU Binary Logic.
B261 Systems Architecture
Question (from exercises 2) Are the following sources likely to be stationary and ergodic? (i)Binary source, typical sequence aaaabaabbabbbababbbabbbbbabbbbaabbbbbba......
Multiplikation H. Malz. Multiplikation H. Malz Operanden laden.
Linear Feedback Shift Registers (LFSR)
CS 105 Tour of the Black Holes of Computing
Monika Gope Lecturer IICT, KUET
1 Interconnect and Packaging Lecture 3: Skin Effect Chung-Kuan Cheng UC San Diego.
Truth Tables & Logic Expressions
Truth Tables and Boolean Algebra Benchmark Companies Inc PO Box Aurora CO
Switching & Logic Laboratory
Discrete Mathematical Structures: Theory and Applications
Digital Systems Introduction Binary Quantities and Variables
Chapter 2: The Logic of Compound Statements 2.4 Application: Digital Logic Circuits 1 Only connect! – E. M. Forster, 1879 – 1970 Howards End, 1910.
Number Systems (1)  Positional Notation N = (a n-1 a n-2... a 1 a 0. a -1 a a -m ) r (1.1) where. = radix point r = radix or base n = number of.
Arithmetic circuits  Binary addition  Binary Subtraction  Unsigned binary numbers  Sign-magnitude numbers  2 ’ S Complement representation  2 ’
B AB CD C A D m0m1m3m2 m4 m5m7m6 m12 m8m9m11 m10 m13 m15m14 Input combo mintermExpressio n 0000m0A’B’C’D’ 0001m1A’B’C’D 0010m2A’B’CD’
5.9 + = 10 a)3.6 b)4.1 c)5.3 Question 1: Good Answer!! Well Done!! = 10 Question 1:
Number Systems  binary, octal, and hexadecimal numbers  why used  conversions, including to/from decimal  negative binary numbers  floating point.
Chapter 13 Numerical Issues
Translate the following verbal phrases to mathematical phrases.
CS1022 Computer Programming & Principles
© 2005 Pearson Addison-Wesley. All rights reserved Figure A.1 Each octal digit is exactly equivalent to three binary digits. OctalBinaryOctalBinary
Backup Strategies for Hyper-V Chris Henley, Veeam Software @HyperVBear.
Binary Lesson 3 Hexadecimal. Counting to 15 Base Base Base 16 Base Base Base 16 Two Ten (Hex) Two Ten (Hex)
Binary Lesson 3 Hexadecimal. Counting to 15 Base Base Base 16 Base Base Base 16 Two Ten (Hex) Two Ten (Hex)
Addition 1’s to 20.
Digital Logic & Design Lecture No. 3. Number System Conversion Conversion between binary and octal can be carried out by inspection.  Each octal digit.
Test B, 100 Subtraction Facts
How To Build A Global Organism Andy Ross. How To Build A Global Organism 00 Opportunities 01 Global Mammon 10 Consequences 11 Global Union.
ENEE244-02xx Digital Logic Design Lecture 10. Announcements HW4 due 10/9 – Please omit last problem 4.6(a),(c) Quiz during recitation on Monday (10/13)
ELECTRONICS TECHNOLOGY Digital Devices I Karnaugh Maps
Lecture 15 Functions CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
Bottoms Up Factoring. Start with the X-box 3-9 Product Sum
20 September How Computers Have Affected Society.
Binary and other number bases. Base Ten This is what we are accustomed to. Digits go from 0 – 9 Headings are represented by powers of ten ThousandsHundredsTensOnes=
and M-ary Quadrature Amplitude Modulation (M-QAM)
1/15/2015 Slide # 1 Binary, Octal and Hex Numbers Copyright Thaddeus Konar Introduction to Binary, Octal and Hexadecimal Numbers Thaddeus Konar.
Number Systems Decimal Binary Denary Octal Hexadecimal Click the mouse or Press the space bar to Continue.
1 Advanced Database Systems Dr. Fatemeh Ahmadi-Abkenari September 2013.
GCSE Computing Theory © gcsecomputing.net 1 GCSE Computing 2.14 Data Representation Binary Arithmetic.
Disassembling Instructions
Opracowanie językowe dr inż. J. Jarnicki
Presentation transcript:

Internet Engineering Czesław Smutnicki Discrete Mathematics – Combinatorics

CONTENT S Functions and distributions Combinatorial objects K-subsets Subsets Sequences Set partitions Number partitions Stirling numbers Bell numbers Permutations Set on/off rule

FUNCTIONS AND DISTRIBUTIONS XY X elements, Y boxes Element can be packed to any box: n-length sequence Each box contains at most one element: set partition Box contains exactly one element: permutation

K-SUBSETS Generate all subsets with k-elements from the set of n elements

SUBSETS

SET PARTITION (1) (1,2) (1)(2) (1,2,3) (1,2)(3) (1,3)(2)(1)(2,3) (1)(2)(3)

NUMBER PARTITION

SECOND TYPE STIRLING NUMBERS

BELL NUMBERS nBnBn

PERMUTATIONS. INTRODUCTION Permutation Inverse permutation Id permutation Composition Inversions Cycles Sign

complexity variance mean receipt number of inversion in  -1 o  n minus the number of cycles in  -1 o  n minus the lenght of the maximal increasing subsequence in  -1 o  measure D A ( ,  ) D S ( ,  ) D I ( ,  ) Move type API NPI INS PERMUTATIONS. DISTANCE MEASURES

GENERATING PERMUTATIONS. IN ANTYLEX ICOGRAPHICAL ORDER void swap(int& a, int& b) { int c=a; a=b; b=c; } void reverse(int m) { int i=1,j=m; while (i<j) swap(pi[i++],pi[j--]); } void antylex(int m) { int i; if (m==1) { for (i=1;i<=m;i++) cout << pi[i] << ' '; cout << endl; } else for (i=1;i<=m;i++) { antylex(m-1); if (i<m) { swap(pi[i],pi[m]); reverse(m-1); }} }

GENERATING PERMUTATIONS. MINIMAL NUMBER OF TRANSPOSITIONS void swap(int& a, int& b) { int c=a; a=b; b=c; } int B(int m, int i) { return (!(m%2)&&(m>2))?(i<(m-1)?i:m-2):m-1; } void perm(int m) { int i; if (m==1) { for (i=1;i<=n;i++) cout << pi[i] << ' '; cout << endl; } else for (i=1;i<=m;i++) { perm(m-1); if (i<m) swap(pi[B(m,i)],pi[m]); } }

GENERATING PERMUTATIONS. MINIMAL NUMBER OF ADJACENT SWAPS void swap(int& a, int& b) { int c=a; a=b; b=c; } void permtp(int m) { int i,j,x,k; int *c=new int[m+1],*pr=new int[m+1]; for (i=1;i<m;i++) { pi[i]=i; c[i]=1; pr[i]=1; } c[m]=0; for (j=1;j<=n;j++) cout << pi[j] << ' '; cout << endl; i=1; while (i<m) { i=1; x=0; while (c[i]==(m-i+1)) { pr[i]=!pr[i]; c[i]=1; if (pr[i]) x++; i++; } if (i<m) { k=pr[i]?c[i]+x:m-i+1-c[i]+x; swap(pi[k],pi[k+1]); c[i]++; for (j=1;j<=n;j++) cout << pi[j] << ' '; cout << endl; } delete[] c; delete[] pr; }

Thank you for your attention DISCRETE MATHEMATICS Czesław Smutnicki