Find the maximum number of bits in the sum

Assignment Help Data Structure & Algorithms
Reference no: EM1380424

The sum of n k-bit numbers can be computed by a combinational arithmetic circuit as follows.

Suppose that the n is an exact power of two. The circuit consists of a complete binary tree of ripple carry adders, in which each node in tree adds 2-numbers and produces a sum which is fed to its parent. The n/2 leaves of the tree input the n k-bit numbers, and the total sum is produced as output by the root. Each ripple-carry adder is as small as possible while still ensuring that the sum is correctly computed.

[a] What is the maximum number of bits in the sum of the n k-bit numbers?
What is the number of full adders in any ripple-carry adder at height h in the tree, where we view leaves as having height 0?

[b] Give a tight asymptotic upper (big-Oh) bound in terms of n and k, on the size of this circuit (definition below). Briefly explain your answer.

[c] Give a tight asymptotic upper bound in terms of n and k on the depth of this circuit (definition below). Briefly explain your answer.

[d] Describe a combinational circuit that computes the sum of n k-bit numbers more efficiently. Analyze the size and depth of this circuit.

Circuit Depth :

As in the case of the comparison networks, we measure the propagation delay of a combinational circuit in terms of the largest number of combinational elements on any path from the inputs to the outputs. Specifically, we define the depth of a circuit, which corresponds to its worst-case "running time", inductively in terms of the depths of its constituent wires. The depth of an input wire is 0. If a combinational element has inputs x1, x2,..., xn at depths d1, d2,...,dn respectively, then it's outputs have depth (max{d1, d2,..., dn}+1).

The depth of a combinational element is the depth of its outputs. The depth of a combinational circuit is the maximum depth of any combinational element in it. Since we prohibit combinational circuits from containing cycles, the various notions of depth are well defined. If each combinational element takes constant time to compute its output values, then the worst-case propagation delay through a combinational circuit is proportional to its depth.

A combinational circuit can sometimes compute faster that its depth. Suppose that a large sub-circuit feeds into one input of a 2-input AND gate but that the other input of the AND gate has a value of 0. The output of the gate will then be 0, independent of the input being applied to the circuit, and the abstraction of depth as the "running time" of the circuit is therefore quite reasonable.

Circuit Size :

Besides circuit depth, there is another resource that we typically wish to minimize when designing circuits - the size of a combinational circuit, which is defined as the number of combinational elements it contains. Intuitively, circuit size corresponds to the memory space used by an algorithm.

This definition of circuit size is not particularly useful for small circuits. After all, since a full adder has a constant number of inputs and outputs and computes a well-defined function, it satisfies the definition of a combinational element. A full adder built from a single full adder combinational element therefore has size 1. In fact, according to this definition, any combinational element has size 1.

Reference no: EM1380424

Questions Cloud

Question about edge connectivity : The edge connectivity of an indirected graph is minimum number k of edges that must be removed to disconnect the graph.
Explain what is the break-even point for room service : Explain what is the break-even point for room service operations in terms of total room service revenue? Break-even point $
Creating decision tree : Premium Airlines has currently offered to settle claims for a class action suit, which was originated for alleged price fixing of tickets. The settlement is stated as follows. Create a decision tree for this condition.
Deviations in the political and cultural institutions : Deviations in the political, legal, regulatory, economic and cultural institutions in these areas have created significant growth
Find the maximum number of bits in the sum : Suppose that the n is an exact power of two. The circuit consists of a complete binary tree of ripple carry adders, in which each node in tree adds 2-numbers.
Companies that do business online can discover : Companies that do business online can discover themselves in legal trouble if they commit a crime, breach a contract or involve in a tortious action
The goods had remained partially destroyed by the water : The bill of lading had a notation on it that the goods had remained partially destroyed by the water leakage after they were loaded on board the ship. Must the confirming bank pay the seller on the letter of credit?
Design two training schedules for the new system : Design two training schedules for the new system - one which is based upon two people released from work at a time, and one which takes advantage of the small number of employees that need to be trained.
Question about site structure : Browse the Web to discover examples of the following site structures Linear and Hierarchical and describe how the content fits the structure.

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Determine storage required for bfs and dfs

Determine the minimum number of nodes expanded and storage required for BFS and DFS? (Hint: this question asks about the best case performance of BFS and DFS).

  Studying in major paralegal

Make a Microsoft Word document which includes a table and hyperlinks to Web sites helpful to someone studying in your main Paralegal.

  Explaining simple symmetric encryption algorithm

Consider a simple symmetric encryption algorithm as follows:Is it a problem if the first block of input happens to be the same as the key? Explain why?

  Users and it organizations arm against phishing attacks

How users and IT organizations must arm themselves against these attacks?

  Discuss new security features in windows server

Which of the system changeover methods is the most expensive? Why? Which of the system changeover methods is the most risky? Why?

  Recurrence-worst case running time-recursive binary search

Provide a recurrence for worst case running time of recursive Binary Search function in terms of n, the size of the search array. Solve the recurrence.

  Creating a class for services

Make a class for services offered by a hair styling salon. Information fields with a String to hold the service description, a double to hold the price, and an integer to hold average number of minutes it takes to perform the service.

  Provide polynomial-time algorithm to decide in graph

Provide a polynomial-time algorithm to decide whether G has unique minimum s - t cut (i.e., an s - t cut of capacity strictly less than that of all other s - t cuts).

  Creating a database with asp.net

Make a database with a table called "MyUsers" and "MyRole" The table should have the following columns.

  Perform page trace analysis by fifo page removal algorithm

Using the FIFO page removal algorithm, do a page trace analysis indicating page faults with asterisks (*). Then compute the failure and success ratios.

  Illustrate how b-tree will expand

Illustrate how tree will expand (after inserting each Part#), and what the final tree would like. (b) Repeat item (a), but use a B-tree of order p = 4 instead of a B+-tree.

  Determine the branching factor

Expalin the search algorithm that results from each of the following special cases. How does it relate to other algorithms we have discussed.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd