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
mamaluj [8]
2 years ago
12

Let m be an integer in the set {0,1,2,3,4,5,6,7,8, 9}, and consider the following problem: determine m by asking 3-way questions

, i.e. questions with at most 3 possible answers. For instance, one could ask which of 3 specific subsets m belongs to.
Give a decision tree argument showing that at least 3 such questions are necessary in worst case. In other words, prove that no correct algorithm can solve this problem by asking only 2 questions in worst case.

Engineering
1 answer:
kupik [55]2 years ago
5 0

Answer:

Take any algorithm if that algorithm solves this problem it can be represented as a ternary decision tree. Therefore each question has at most three answers.

There are ten possible verdicts, the height of such kind of tree should satisfy

ℎ >= ⌈log3(10)⌉ = 3

Hence no such algorithm can ask less than three questions in the worst case.

---

b)

Each and every internal node represents a question asking whether m belongs to one of three possible subset of {0, 1, 2, 3, 4, 5, 6, 7, 8, 9} or not

For example 0123|456|789 represented the questionDoes “m: belongs to {0, 1, 2, 3}, to {4, 5, 6}, or to {7, 8, 9}?"

Verdicts are placed in brackets "[ ]"

Explanation:

decision tree is attached below

You might be interested in
Let Deterministic Quicksort be the non-randomized Quicksort which takes the first element as a pivot, using the partition routin
juin [17]

Answer:

Answer for the question:

Let Deterministic Quicksort be the non-randomized Quicksort which takes the first element as a pivot, using the partition routine that we covered in class on the quicksort slides. Consider another almost-best case for quicksort, in which the pivot always splits the arrays 1/3: 2/3, i.e., one third is on the left, and two thirds are on the right, for all recursive calls of Deterministic Quicksort. (a) Give the runtime recurrence for this almost-best case. (b) Use the recursion tree to argue why the runtime recurrence solves to Theta (n log n). You do not need to do big-Oh induction. (c) Give a sequence of 4 distinct numbers and a sequence of 13 distinct numbers that cause this almost-best case behavior. (Assume that for 4 numbers the array is split into 1 element on the left side, the pivot, and two elements on the right side. Similarly, for 13 numbers it is split with 4 elements on the left, the pivot, and 8 elements on the right side.)

is given in the attachment.

Explanation:

Download pdf
3 0
2 years ago
The pump of a water distribution system is powered by a 6-kW electric motor whose efficiency is 95 percent. The water flow rate
Sonja [21]

Answer:

a) Mechanical efficiency (\varepsilon)=63.15%  b) Temperature rise= 0.028ºC

Explanation:

For the item a) you have to define the mechanical power introduced (Wmec) to the system and the power transferred to the water (Pw).

The power input (electric motor) is equal to the motor power multiplied by the efficiency. Thus, Wmec=0.95*6kW=5.7 kW.

Then, the power transferred (Pw) to the fluid is equal to the flow rate (Q) multiplied by the pressure jump \Delta P. So P_W = Q*\Delta P=0.018m^3/s * 200x10^3 Pa=3600W.

The efficiency is defined as the ratio between the output energy and the input energy. Then, the mechanical efficiency is \varepsilon=3.6kW/5.7kW=0.6315=63.15\%

For the b) item you have to consider that the inefficiency goes to the fluid as heat. So it is necessary to use the equation of the heat capacity but in a "flux" way. Calling <em>H</em> to the heat transfered to the fluid, the specif heat of the water and \rho the density of the water:

[tex]H=(5.7-3.6) kW=\rho*Q*c*\Delta T=1000kg/m^3*0.018m^3/s*4186J/(kg \ºC)*\Delta T[/tex]

Finally, the temperature rise is:

\Delta T=2100/75348 \ºC=0.028 \ºC

7 0
2 years ago
A distância entre duas retas reversas é a medida de um segmento orientado que *?
Agata [3.3K]

Answer:

Fatec – SP) Seja A um ponto pertencente à reta r, contida no plano α. É verdade que:

a) existe uma única reta que é perpendicular à reta r no ponto A.

b) existe uma única reta, não contida no plano α, que é paralela à reta r.

c) existem infinitos planos distintos entre si, paralelos ao plano α, que contém a reta r.

d) existem infinitos planos distintos entre si, perpendiculares ao plano α e que contêm a reta r.

e) existem infinitas retas distintas entre si, contidas no plano α e que são paralelas à reta r.

2. (UF – AL) Classifique como verdadeira ou falsa cada uma das afirmativas abaixo.

1) Duas retas que não têm pontos com

8 0
2 years ago
Write a method printShampooInstructions(), with int parameter numCycles, and void return type. If numCycles is less than 1, prin
kirill [66]

Answer:

// The method is defined with a void return type

// It takes a parameter of integer called numCycles

// It is declared static so that it can be called from a static method

public static void printShampooInstructions(int numCycles){

// if numCycles is less than 1, it display "Too few"

   if (numCycles < 1){

       System.out.println("Too few.");

   }

// else if numCycles is less than 1, it display "Too many"

    else if (numCycles > 4){

       System.out.println("Too many.");

   }

// else it uses for loop to print the number of times to display

// Lather and rinse

  else {

       for(int i = 1; i <= numCycles; i++){

           System.out.println(i + ": Lather and rinse.");

       }

       System.out.println("Done");

       

   }

}

Explanation:

The code snippet is written in Java. The method is declared static so that it can be called from another static method. It has a return type of void. It takes an integer as parameter.

It display "Too few" if the passed integer is less than 1. Or it display "Too much" if the passed integer is more than 4. Else it uses for loop to display "Lather and rinse" based on the passed integer.

8 0
2 years ago
The 8-mm-thick bottom of a 220-mm-diameter pan may be made from aluminum (k = 240 W/m ⋅ K) or copper (k = 390 W/m ⋅ K). When use
Artemon [7]

Answer:

For aluminum 110.53 C

For copper 110.32 C

Explanation:

Heat transmission through a plate (considering it as an infinite plate, as in omitting the effects at the borders) follows this equation:

q = \frac{k * A * (th - tc)}{d}

Where

q: heat transferred

k: conduction coeficient

A: surface area

th: hot temperature

tc: cold temperature

d: thickness of the plate

Rearranging the terms:

d * q = k * A * (th - tc)

\frac{d * q}{k * A} = th - tc

th = \frac{d * q}{k * A} + tc

The surface area is:

A = \frac{\pi * d^2}{4}

A = \frac{\pi * 0.22^2}{4} = 0.038 m^2

If the pan is aluminum:

th = \frac{0.008 * 600}{240 * 0.038} + 110 = 110.53 C

If the pan is copper:

th = \frac{0.008 * 600}{390 * 0.038} + 110 = 110.32 C

7 0
2 years ago
Other questions:
  • Consider a plane composite wall that is composed of two materials of thermal conductivities kA 0.1 W/mK and kB 0.04 W/mK and thi
    14·1 answer
  • Carbon dioxide gas enters a pipe at 3 MPa and 500 K at a rate of 2 kg/s. CO2 is cooled at constant pressure as it flows in the p
    10·1 answer
  • Consider a very long rectangular fin attached to a flat surface such that the temperature at the end of the fin is essentially t
    9·1 answer
  • Two physical properties that have a major influence on the cracking of workpieces, tools, or dies during thermal cycling are the
    13·1 answer
  • Two resistors of values 7.0 and 15.0 Ω are connected in parallel. This combination in turn is hooked in series with a 3.8- Ω res
    7·1 answer
  • The following passage contains a fragment. Select the correct revision. Presley took the exuberance of gospel and added the freq
    7·1 answer
  • An air standard cycle with constant specific heats is executed in a closed pistoncylinder system and is composed of the followin
    10·1 answer
  • a. (24 points) Describe the microstructure present in a 10110 steel after each step in each of the following heat treatments (no
    10·1 answer
  • An ideal Diesel cycle has a compression ratio of 18 and a cutoff ratio of 1.5. Determine the maximum air temperature and the rat
    9·1 answer
  • While at a concert you notice five people in the crowd headed in the same direction. Your tendency to group them is due to? *
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!