מבנה מחשבים תרגול מספר 4. Definition: A Boolean function f :{0,1} n  {0,1} is monotone if x  y  f (x)  f ( y) (where x  y means : for every i x i.

Slides:



Advertisements
Similar presentations
22C:19 Discrete Structures Induction and Recursion Spring 2014 Sukumar Ghosh.
Advertisements

Primitive Recursive Functions (Chapter 3)
Lecture 3: Parallel Algorithm Design
Recursive Definitions and Structural Induction
Using Divide and Conquer for Sorting
Lectures on Network Flows
Advanced Topics in Algorithms and Data Structures 1 Lecture 4 : Accelerated Cascading and Parallel List Ranking We will first discuss a technique called.
Accelerated Cascading Advanced Algorithms & Data Structures Lecture Theme 16 Prof. Dr. Th. Ottmann Summer Semester 2006.
Topics: 1. Trees - properties 2. The master theorem 3. Decoders מבנה המחשב - אביב 2004 תרגול 4#
Flip-Flops מבנה המחשב + מבוא למחשבים ספרתיים תרגול 10#
2 -1 Analysis of algorithms Best case: easiest Worst case Average case: hardest.
COMBINATIONAL LOGIC CIRCUITS C.L. x1 x2 xn Z Z = F (x1, x2, ……., Xn) F is a Binary Logic (BOOLEAN ) Function Knowing F Allows Straight Forward Direct Implementation.
Addition מבנה המחשב + מבוא למחשבים ספרתיים תרגול 7#
מבנה המחשב + מבוא למחשבים ספרתיים תרגול 5# Topics: 1.Encoders and decoders 2.Shifters.
Section 10.3 Logic Gates.
Decoders and Trees מבנה המחשב + מבוא למחשבים ספרתיים תרגול 4#
Chapter 11 Limitations of Algorithm Power Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
Topics: 1. Priority Encoders 2. A question from an exam 3. Addition (if time permits) מבנה המחשב - אביב 2005 תרגול 6#
Section Section Summary Recursive Algorithms Proving Recursive Algorithms Correct Recursion and Iteration (not yet included in overheads) Merge.
Cardinality & Sorting Networks. Cardinality constraint Appears in many practical problems: scheduling, timetabling etc’. Also takes place in the Max-Sat.
Defining Polynomials p 1 (n) is the bound on the length of an input pair p 2 (n) is the bound on the running time of f p 3 (n) is a bound on the number.
1 Introduction to Abstract Mathematics Applications : Digital Logic Circuits 2.4 and Number Systems 2.5 Instructor: Hayk Melikya
Binary Trees. Binary Tree Finite (possibly empty) collection of elements A nonempty binary tree has a root element The remaining elements (if any) are.
ROM & PLA Digital Logic And Computer Design
The Lower Bounds of Problems
Lecture 2 Sorting. Sorting Problem Insertion Sort, Merge Sort e.g.,
Karnaugh maps for the binary full adder.
1 Lower Bounds Lower bound: an estimate on a minimum amount of work needed to solve a given problem Examples: b number of comparisons needed to find the.
Computer Science 101 Circuit Design - Examples. Sum of Products Algorithm Identify each row of the output that has a 1. Identify each row of the output.
Complexity 20-1 Complexity Andrei Bulatov Parallel Arithmetic.
ACOE1611 Combinational Logic Circuits Reference: M. Mano, C. Kime, “Logic and Computer Design Fundamentals”, Chapter 2.
Linear Algebra. Circuits The circuits in computers and other input devices have inputs, each of which is either a 0 or 1, the output is also 0s and 1s.
Mathematical Preliminaries
Computer Science 101 More Devices: Arithmetic. From 1-Bit Equality to N-Bit Equality = A B A = B Two bit strings.
Foundation of Computing Systems
Discrete Mathematics CS 2610 February 10, Agenda Previously Functions And now Finish functions Start Boolean algebras (Sec. 11.1)
Logic Gates M. AL-Towaileb1. Introduction Boolean algebra is used to model the circuitry of electronic devices. Each input and each output of such a device.
Lecture 7: Searching a Tree Neil Ghani University of Strathclyde.
August 2003 CIS102/LECTURE 9/FKS 1 Mathematics for Computing Lecture 9 LOGIC Chapter 3.
Chapter 5 With Question/Answer Animations 1. Chapter Summary Mathematical Induction - Sec 5.1 Strong Induction and Well-Ordering - Sec 5.2 Lecture 18.
Section Recursion 2  Recursion – defining an object (or function, algorithm, etc.) in terms of itself.  Recursion can be used to define sequences.
Section Recursion  Recursion – defining an object (or function, algorithm, etc.) in terms of itself.  Recursion can be used to define sequences.
1 Proving Properties of Recursive Functions and Data Structures CS 270 Math Foundations of CS Jeremy Johnson.
Chapter 12. Chapter Summary Boolean Functions Representing Boolean Functions Logic Gates Minimization of Circuits (not currently included in overheads)
Lecture 2 Sorting.
P & NP.
Computer Architecture & Operations I
Computer Science 210 Computer Organization
Lecture 3: Parallel Algorithm Design
CSCI-100 Introduction to Computing
12. Graphs and Trees 2 Summary
CHAPTER 4 Trees.
Lectures on Network Flows
Orthogonal Range Searching and Kd-Trees
Proving Properties of Recursive Functions and Data Structures
Computer Science 210 Computer Organization
Reconfigurable Computing
CSE 311: Foundations of Computing
Logic Gates L Al-zaid Math110.
Week 7: Gates and Circuits: PART II
Richard Anderson Lecture 28 NP-Completeness
Divide-and-Conquer 7 2  9 4   2   4   7
COMS 361 Computer Organization
Chapter 11 Limitations of Algorithm Power
The Lower Bounds of Problems
Logic Gates Dr.Halimah Alshehri.
Parallel build blocks.
Topic 5: Heap data structure heap sort Priority queue
Merge Sort 4/10/ :25 AM Merge Sort 7 2   7  2   4  4 9
Presentation transcript:

מבנה מחשבים תרגול מספר 4

Definition: A Boolean function f :{0,1} n  {0,1} is monotone if x  y  f (x)  f ( y) (where x  y means : for every i x i  y i ). Prove the following claim: f :{0,1} n  {0,1} is monotone iff f can be implemented by a combinational circuit that contains only AND-gates and OR-gates.

Sum of products

A Boolean function f : {0,1} 2 →{0,1} is associative if f(f(  1,  2 ),  3 ) = f(  1,f(  2,  3 )) for every  1,  2,  3  {0,1} Associative Boolean functions

Question 3.3 Design a zero-tester defined as follows. Input: x[n-1 : 0]. Output: y Functionality: y = 1 iff x[n-1 : 0] = 0 n : 1. Suggest a design based on an or-tree. 2. Suggest a design based on an and-tree. 3. What do you think about a design based on a tree of nor-gates?

balanced partition Two positive integers a,b are a balanced partition of n if: 1.a+b = n, 2.Max{ }

Question 3.7 Prove that if n = 2 k -r, where 0  r<2 k-1, then any partition in which 2 k-1 -r  a  2 k-1 and b = n - a is a balanced partition.

Question 3.8 Consider the following recursive algorithm for constructing a binary tree T n with n  2 leaves. Prove that the depth of T n is. 1. The case that n  2 is trivial (two leaves connected to a root). 2. If n > 2, then let a, b be balanced partition of n. 3. Compute trees T a and T b. Connect their roots to a new root to obtain T n.