Questions
We have a multi-level computer which has hardware at level 1 and identical levels of translation...

We have a multi-level computer which has hardware at level 1 and identical levels of translation at all levels above it. Each level has W times more powerful instructions compared to the level below it. An instruction being W times as powerful means that optimally sequenced W instructions at level n-1 do the same work of one instruction at level n. In practice, the optimal translation from a level to the one below it is hard to achieve. Therefore, we will assume that an instruction at level n is translated into S instructions at level n-1, where S > W. Assuming we have 6 levels in this multi-level computer find the ratio of the time it takes to execute a program at level 6 to the time it takes an optimal sequence of instructions to do the same work at level 1. Assume all instruction types at one level take the same amount of time to execute. Generalize your answer to N levels.

In: Computer Science

How algorithms address object-oriented classes and objects. What is the File object? How are File objects...

How algorithms address object-oriented classes and objects. What is the File object? How are File objects used in algorithms?

175 words minumum please :)

In: Computer Science

Do you use virtualization and/or cloud computing at home or at work? If so, how? Which...

Do you use virtualization and/or cloud computing at home or at work? If so, how? Which applications do you use? Do you like them/hate them? Do you have any recommendations for us?

If you have limited experience working with cloud computing/virtualization, do some research on different services available. Which do you think you might consider using in the future?

In: Computer Science

Program P1 1) integer A, B; 2) input (A); 3) while (A > 0) 4) {...

Program P1

1) integer A, B;

2) input (A);

3) while (A > 0)

4) {

5) B = 1;

6) if (A < 10)

7) B = 0;

8) if (A < 20 or A > 25)

9) B = A * B;

10) else

11) B = A + B;

12) output (A, B);

13) input (A);

14) }

15) output (“Program ends.”);

16) end;

T = {t1=<1>, t2=<33>, t3=<‐1>} or T = {t1=, t2=, t3=}

1. What is the statement domain for P1? Express as line numbers. Exclude syntactical markers, such as {, }, else, and end.

2. What is the statement coverage of T for P1? Express as an unsimplified fraction.

In: Computer Science

GIS systems are integrated with e-government services for different purposes , give an example of saudi...

GIS systems are integrated with e-government services for different purposes , give an example of saudi e-government service that use GIS and explain how it use it?

In: Computer Science

In Clojure, how do I enter a vector of vectors and print the specified index in...

In Clojure, how do I enter a vector of vectors and print the specified index in each vector? i.e. I enter [1 2 3 4] [5 6 7 8] and my function gives me [1 5] when I call (index vector 0)?

In: Computer Science

Write a program that will read in from input file one line at a time until...

Write a program that will read in from input file one line at a time until end of file and output the number of words in the line and the number of occurrences of each letter. Define a word to be any string of letters that is delimited at each end by either whitespace, a period, a comma or the beginning or end of the line. You can assume that the input consists entirely of letters, whitespaces, commas and periods. When outputting the number of letters that occur in a line, be sure to count upper and lowercase versions of a letter as the same letter. Output the letters in alphabetical order and list only those letters that do occur in the input line. For example, the input line:-I say HI should produce output similar to the following:-

3 words

1 a

1 h

2 i

1 s

1 y

Note: in addition to the above, output the result to file named “result.txt”

In: Computer Science

def largest_rectangle_in_matrix(matrix: List[List[int]]) -> int: """ Returns the area of the largest rectangle in <matrix>. The...

def largest_rectangle_in_matrix(matrix: List[List[int]]) -> int:
"""
Returns the area of the largest rectangle in <matrix>.

The area of a rectangle is defined as the number of 1's that it contains.

Again, you MUST make use of <largest_rectangle_at_position> here. If you
managed to code largest_rectangle_at_position correctly, this function
should be very easy to implement.

Similarly, do not modify the input matrix.

Precondition:
<matrix> will only contain the integers 1 and 0.

>>> case1 = [[1, 0, 1, 0, 0],
... [1, 0, 1, 1, 1],
... [1, 1, 1, 1, 1],
... [1, 0, 0, 1, 0]]
>>> largest_rectangle_in_matrix(case1)
6
"""

pass

In: Computer Science

Python A survey gathers heights and weight of 50 participants and recorded the participants age as...

Python

A survey gathers heights and weight of 50 participants and recorded the participants age as ages=[40,56,46,58,79,70,67,46,32,91,92,93,47,95,69,56,50,30,9,29,29,0,31,21,14,18,16,18,76,68,6,9,78,81,71,91,01,69,78,77,54,59,59,41,51,48,49,76,10]

upd: do anything in Python using everything in the question

In: Computer Science

Q4: Provide a definition of a bottleneck. Why is it important to find the bottleneck?

Q4: Provide a definition of a bottleneck. Why is it important to find the bottleneck?

In: Operations Management

Brief the following case using the IRAC method. Issue: Rule: Application: Conclusion: On February l, 2004,...

Brief the following case using the IRAC method.

Issue:

Rule:

Application:

Conclusion:

On February l, 2004, CBS, the television network, presented a live broadcast of the National Football League&#39;s Super Bowl XXXVIII, which included a
halftime show produced by MTV Networks. Both CBS and MTV were divisions of Viacom Inc. at the time. Nearly 90 million viewers watched the show,
which featured recording artists Janet Jackson and Justin Timberlake. Jackson and Timberlake performed his popular song &quot;Rock Your Body &quot; as the show&#39;s
finale. Their performance involved sexually suggestive choreography with Timberlake seeking to dance with Jackson and she alternating between accepting and
rejecting his advances. The performance ended with Timberlake singing, &quot;gonna have you naked by the end of this song, &quot; and simultaneously tearing away part
ofJackson &#39;s bustier. CBS had implemented a five-second audio delay to guard against the possibility of indecent language being transmitted on air, but it did
not employ similar precautionary technology for video images. As a result, Jackson&#39;s bare right breast was exposed on camera for nine-sixteenths of one second.

Jackson &#39;s exposed breast caused a sensation and resulted in a large number of viewer complaints to the Federal Communications Commission. In response, the
FCC issued a letter of inquiry asking CBS to provide more information about the broadcast. CBS issued a public statement of apology for the incident. CBS
stated that Jackson and Timberlake&#39;s wardrobe stunt was unscripted and unauthorized, claiming CBS had no advance notice of any plan by the performers to
deviate from the script. After its review, the FCC determined CBS was liable for a forfeiture penalty of $550,000 on several grounds, including that under the
doctrine ofrespondeat superior, CBS was vicariously liable for the willful actions of its employees, Jackson and Timberlake. CBS asked the Third Circuit
Court ofAppeals to review the FCC decision.

Scirica, Chief Judge
The respondeat superior doctrine provides that &quot;[a]n employer is subject to liability for torts committed by employees while acting within the scope of their
employment.&quot; Restatement (Third) ofAgency 2.04 (2006)

But even though the respondeat superior doctrine may apply in this context, it is limited to the conduct of employees acting within the scope of their
employment. Determining whether CBS may be liable under respondeat superior first requires selection of the applicable legal standard for differentiating an
&quot;employee&quot; from an &quot;independent contractor.&quot;

In Cmty. for Creative Non-Violence v. Reid, 490 U.S. 730 (1989), the Court set forth a test for determining who qualifies as an &quot;employee&quot; under the common
law:

In determining whether a hired party is an employee under the general common law of agency, we consider the hiring party&#39;s
right to control the manner and means by which the product is accomplished. Among the other factors relevant to this inquiry
are the skill required; the source of the instrumentalities and tools; the location of the work; the duration of the relationship
between the parties; whether the hiring party has the right to assign additional projects to the hired party; the extent of the
hired party&#39;s discretion over when and how long to work; the method of payment; the hired party&#39;s role in hiring and paying
assistants; whether the work is part of the regular business of the hiring party; whether the hiring party is in business; and the
tax treatment of the hired party.

While establishing that all of these factors are relevant and that &quot;no one of these factors is determinative,&quot; Reid did not provide guidance on the Page 996
relative weight each factor should be assigned when performing a balancing analysis. Accordingly, all of the Reid factors are relevant, and no one factor is
decisive, but the weight each factor should be accorded depends on the context of the case. Some factors will have &quot;little or no significance in determining
whether a party is an independent contractor or an employee&quot; on the facts of a particular case. In the present case, the FCC erred by failing to consider several
important Reid factors when determining whether Jackson and Timberlake were employees of CBS. And rather than balancing those factors it did consider,
the Commission focused almost exclusively on CBS&#39;s right of control over the performers.

Only three factors weigh in favor of a determination that Jackson and Timberlake were employees of CBS. First, CBS is in business, which increases the
possibility that it would employ people. Second, CBS regularly produces shows for national broadcast in the course of its business. Both factors are relatively
insignificant on balance. Third, and most significant to its argument, is the factor the FCC focused on in its orders: CBS&#39;s right to control the manner and means
by which Jackson and Timberlake accomplished their Halftime Show performance. As the FCC contends, CBS, through its corporate affiliates, supervised the
Halftime Show and retained the right to approve all aspects of the show&#39;s performances. But it is undisputed that CBS&#39;s actual control over the Halftime Show
performances did not extend to all aspects of the performers&#39; work. The performers, not CBS, provided their own choreography and retained substantial latitude
to develop the visual performances that would accompany their songs. Similarly, as the FCC notes, CBS personnel reviewed the performers&#39; selections of set
items and wardrobes, but the performers retained discretion to make those choices in the first instance and provided some of their own materials.

CBS&#39;s control was extensive but not determinative of employment. Even though a principal&#39;s right to control is an important factor weighing in favor of a
determination that an employment relationship existed, it is not dispositive when considered on balance with the rest of the Reid factors. Of the remaining
factors significant on the facts here, all are strongly indicative of Jackson and Timberlake&#39;s independent contractor status. First, it is undisputed that both
Jackson and
Timberlake were hired for brief, one-time performances during the Halftime Show; CBS could not assign more work to the performers.* Second, Jackson and
Timberlake selected and hired their own choreographers, backup dancers, and other assistants without any involvement on the part of CBS.

Third, Jackson and Timberlake were compensated by one-time, lump-sum contractual payments and &quot;promotional considerations&quot; rather than by salaries or
other similar forms of remittances, without the provision of employee benefits. Fourth, the skill required of a performer hired to sing and dance as the headlining
act for the Halftime Show—a performance during a Super Bowl broadcast, as the FCC notes, that attracted nearly 90 million viewers and was the highest-rated
show during the 2()()3-()4 television season—is substantial even relative to the job of a general entertainer, which is itself a skilled occupation.

Also weighing heavily in favor of Jackson and Timberlake&#39;s status as independent contractors is CBS&#39;s assertion in its briefs, which the FCC does not refute, that
it paid no employment tax. 1--1ad the performers been employees rather than independent contractors, federal law would have required CBS to pay such taxes.

Finally, there is no evidence that Jackson, Timberlake, or CBS considered their contractual relationships to be those of employer-employee. In Reid, the Court
incorporated the Restatement, describing it as &quot;setting forth a nonexhaustive list of factors relevant to determining whether a hired party is an employee&quot;
under the common law of agency. Among the factors not explicitly listed in Reid, but included in the Restatement, is the parties&#39; understanding of their
contractual relationship. See Restatement (Third) ofAgency 7.07 cmt. f (including as an explicit factor in determining employment status &quot;whether the
principal and the agent believe that they are creating an employment relationship&quot;). Although the Commission did not inquire into this factor, it should have
been a significant consideration in this case. Under the FCC&#39;s rationale, band members contracted to play a one-song set on a talk show or a &quot;one-show-only&quot;
televised concert special presumably would be employees of the broadcaster. These performers—who frequently promote their work through brief contractual
relationships with media outlets—would be &quot;employees&quot; of dozens of employers every year. Accordingly, it is doubtful that either the performers here or
CBS believed their contracts created employment relationships.

On balance, the relevant factors here weigh heavily in favor of a determination that Jackson and Timberlake were independent contractors rather than employees
of CBS. Accordingly, the doctrine of respondeat superior does not apply on these facts.

FCC order vacated in favor of CBS.

In: Operations Management

C++ Funcion For this lab you need to write a program that will read in two...

C++ Funcion

For this lab you need to write a program that will read in two values from

a user and output the greatest common divisor (using Euclidean algorithm)

to a file. You will also need to demonstrate

using ostream and ostringstream by creating 2 functions to output your print heading: one that uses ostream and the other uses ostringstream.

Using ostream and ostringstream

Write two PrintHeader functions that will allow you to output to the screen and to an output file.The first should use ostream and should be called twice in main to output your print heading to the screen and to a file.The second one will use ostringstream and return a string – call it two times to output to the screen and to a file.

Greatest Common Divisor

In mathematics, the greatest common divisor (GCD) of two or more integers(when at least one of them is not zero)is the largest positive integer that

divides the numbers without a remainder.If one of them is zero then the larger value is the GCD.

Euclidean Algorithm

The Euclidean algorithm works by using successive long divisions swapping out the lowest value with the remainder and the largest value with the previous smallest value until the remainder is 0. The way it works is that you find the remainder of the larger number divided by the smaller number. If the remainder is not 0 then the larger number gets the smaller number, the smaller number gets the remainder and we divide again. The process continues until the remainder is 0.

For example:

Let’s say we want to find the GCD of

74 & 32.

We would first divide

74 and 32.

74 / 32 = 2 r 10

Next we take the smaller number (32) and divide it by the remainder (10).

32 / 10 = 3 r 2

Again we take the smaller number (10) and divide it by the new remainder(2).

We repeat this process until the remainder is 0.

10 / 2 = 5 r 0

Once the remainder is 0 we stop and our GCD is the last non-zero remainder, which in this case is 2.

For the GCD write a function to read in the two values, a function to calculate the GCD, and a function to output the results.

Have the code run 4 times.

Test with the following inputs:

74, 32

99, 30

48, 18

12, 0

Screen INPUT/OUTPUT-should be formatted as follows –

(Class heading should display 2xs)

Enter the first integer: 72

Enter the second integer: 32

Enter the first integer: 99

Enter the second integer: 30

...

Thank you for using my GCD

calculator!

---------------------------------------------------------------------------------------

OUTPUT File format -(Class heading should display 2xs)

The GCD for 72 & 32 = 8

The GCD for 99 & 30 = 3

1.Screen I/O

2.Output File

3.Header File

4.int Main -

documented according to the requirements

& printed from eclipse

5.

Functions (in order in which they are called)

-

documented according to the requirements

& printed from eclipse

In: Computer Science

C#: A book publisher has limited the cost of every book they publish to no more...

C#:

A book publisher has limited the cost of every book they publish to no more than 10 cents per page.

  1. Create a BookException class with a constructor that requires three (3) arguments for each book: a string title, a double price and an int number of pages.

  2. Create an error message that is passed to the Exception class constructor for the Message property when a book does not meet the price-to-pages ratio. The error message might be:

                                                                         For Goodnight Moon, ratio is invalid.

                                                                         ...Price is $12.99 for 25 pages

    The price-to-pages ratio is determined by checking the following:  price > RATE * pages where RATE = 0.10

  3. Create a Book class that has the following fields:  string title, string author, double price and int number of pages.

  4. Create properties (accessors) for each field.

  5. Throw a BookException if a book object is created that has a price that is more than 10 cents per page.

  6. In Main create 4 Book objects and use the constructor for Book to pass the four inputs when each object is instantiated, some where the ratio is correct and some where the ratio is not correct.

  7. Catch any thrown exceptions and display BookException Message.

  8. Internal Documentation.

  9. Possible output:

        The inputs passed were:

                ("Goodnight Moon", "Brown", 12.99, 25)

                ("World History", "Stein", 72.99, 900)

                ("The Grapes of Math", "Stoltz", 30.99, 300)

                ("Steal This Book", "Hoffman", 72.99, 800)

        The results were:

    For Goodnight Moon, ratio is invalid.
    ...Price is $12.99 for 25 pages.
    For The Grapes of Math, ratio is invalid.
    ...Price is $30.99 for 300 pages.
    Press any key to continue . . .

In: Computer Science

Java Question 5: Count elements in the heap Write a function that returns the number of...

Java Question 5: Count elements in the heap

Write a function that returns the number of elements in a min heap strictly less than a given number.

Method signature: public static int elemNumHeap(PriorityQueue minHeap, int val)

Please also include testers.

In: Computer Science

Would an unexpected increase in sales and production result in an under-applied or over-applied overhead? Explain....

Would an unexpected increase in sales and production result in an under-applied or over-applied overhead? Explain.

Please no hand-written answers.

In: Accounting