answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
kakasveta [241]
1 year ago
10

Timing circuits are a crucial component of VLSI chips. Here’s a simple model of such a timing circuit. Consider a complete balan

ced binary tree with n leaves, where n is a power of two. Each edge e of the tree has an associated length le, which is a positive number. The distance from the root to a given leaf is the sum of the lengths of all the edges on the path from the root to the leaf.
The root generates a clock signal which is propagated along the edges to the leaves. We’ll assume that the time it takes for the signal to reach a given leaf is proportional to the distance from the root to the leaf.

Now, if all leaves do not have the same distance from the root, then the signal will not reach the leaves at the same time, and this is a big problem. We want the leaves to be completely synchronized, and all to receive the signal at the same time. To make this happen, we will have to increase the lengths of certain edges, so that all root-to-leaf paths have the same length (we’re not able to shrink edge lengths). If we achieve this, then the tree (with its new edge lengths) will be said to have zero skew. Our goal is to achieve zero skew in a way that keeps the sum of all the edge lengths as small as possible.

Give an algorithm that increases the lengths of certain edges so that the resulting tree has zero skew and the total edge length is as small as possible.
Computers and Technology
1 answer:
gregori [183]1 year ago
5 0

Answer:

Let L and R be the sub-trees underneath the root r.

If the height of L (where we consider height to be the maximum length of all root-leaf paths) is ∆ more than that of R, ∆ ≥ 0, then the length of the edge  (r, R) is increased by ∆.

Then, we separately perform the same cycle over L and R.

Once more, by induction, argue that this greedy algorithm is efficient –

when it does not increase the length of (r, R) edge by ∆, then prove that the solution can be improved.

You might be interested in
Julie bought a house for $315,000 and has a $285,000 mortgage. she claims she has $315,000 in equity. is she correct? if not, ho
mr Goodwill [35]
No she is not. Equity is equal to assets less liabilities. Her asset is the house market value and her liability is the payable mortgage amount of the house.
where
 asset = $315000
 liability = $285000

Julie's Home equity =  asset - liability
                                = $315000- $285000
                                = $ 30000


5 0
2 years ago
Read 2 more answers
Write a fragment of code that reads in strings from standard input, until end-of-file and prints to standard output the largest
Nady [450]

Answer:

Explanation:

Sample input file: numbers.txt

8 9 7 67 78 45 67 99 1001

Sample Output:

The largest value is:1001

Code to Copy:

// include stdafx, if using visual studio.

#include "stdafx.h"

// declare the necessary header files.

#include <iostream>

#include <string>

#include <fstream>

using namespace std;

// Start the main function

int main()

{

// create the object of ifstream.

ifstream in_file;

// Open the file

in_file.open("numbers.txt");

// Declare the string variable

string str;

// Declare the integer variables.

int maximum = 0;

int num;

// Check whether the file open

if (in_file.is_open())

{

// Traverse the file till the end.

while (!in_file.eof())

{

// traversing the value.

in_file >> str;

// convert the string into integer.

num = stoi(str);

// Check whether value is max or not.

if (maximum < num)

{

// Update the value of maximum.

maximum = num;

}

}

}

// Display the statement on console.

cout << "The largest value is:" << maximum << endl;

// Close the file.

in_file.close();

system("pause");

return 0;

}

8 0
2 years ago
Brian drives a car that uses voice commands for navigation. Which field did researchers use to develop a car-based AI that under
pickupchik [31]

Answer:

A, Computer Engineering

4 0
2 years ago
Writing a program in a language such as c or java is known as _____ the program.
Angelina_Jolie [31]
<span>Writing a program in a language such as c or java is known as coding the program</span>
8 0
2 years ago
Write a program that calculates an adult's fat-burning heart rate, which is 70% of 220 minus the person's age. Complete fat_burn
Brut [27]

Answer:

def get_age():

age = int(input())

if(age>=18 and age<=75):

return age

else:

raise ValueError("Invalid age.")

def fat_burning_heart_rate(age):

return ((70 / 100) * (220 - age))

if __name__ == '__main__':

try:

age = get_age()

print("Fat burning heart rate for a",age,"year-old:",fat_burning_heart_rate(age),"bpm")

except ValueError as ve:

print(ve.args[0])

print("Could not calculate heart rate info.")

Explanation:

def get_age():

age = int(input())

if(age>=18 and age<=75):

return age

else:

raise ValueError("Invalid age.")

def fat_burning_heart_rate(age):

return ((70 / 100) * (220 - age))

if __name__ == '__main__':

try:

age = get_age()

print("Fat burning heart rate for a",age,"year-old:",fat_burning_heart_rate(age),"bpm")

except ValueError as ve:

print(ve.args[0])

print("Could not calculate heart rate info.")

The above program performs an operation to determine the percentage of fat burning rate.

It takes the value of the ages of some adult as input, performs a series of conditional statement function on them. Before given an output .

Kindly check attachment for output

8 0
2 years ago
Other questions:
  • Which statement regarding dialogues in multiplayer games is true? Dialogues are based only on players’ actions.
    7·2 answers
  • When seeking information on the internet about a variety of subjects the most useful place to look would be?
    13·2 answers
  • Blender questions
    8·2 answers
  • A class car and its subclass bmw each have a method run(), which was written by the developer as part of the class definition. i
    10·1 answer
  • Witch printer covers a large range of colors than any other printer does
    15·2 answers
  • A ____ resembles a circle of computers that communicate with each other.
    14·1 answer
  • Given: an int variable k, an int array current Members that has been declared and initialized, an int variable memberID that has
    11·1 answer
  • Given a positive integer, output its complement number. The complement strategy is to flip the bits of its binary representation
    6·1 answer
  • Write a program that calculates taxi fare at a rate of $1.50 per mile. Your pro-gram should interact with the user in this manne
    12·1 answer
  • Write a program using integers userNum and x as input, and output userNum divided by x four times. Ex: If the input is 2000 2, t
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!