Answer:
y6ou dont have mind
Explanation:
Suppose you are choosing between the following three algorithms:
• Algorithm A solves problems by dividing them into five subproblems of half the size, recursively solving each subproblem, and then combining the solutions in linear time.
• Algorithm B solves problems of size n by recursively solving two subproblems of size n − 1 and then combining the solutions in constant time.
• Algorithm C solves problems of size n by dividing them into nine sub-problems of size n=3, recursively solving each sub-problem, and then combining the solutions in O(n2) time.
What are the running times of each of these algorithms (in big-O notation), and which would you choose?
Answer:
Algorithm C is chosen
Explanation:
For Algorithm A
T(n) = 5 * T ( n/2 ) + 0(n)
where : a = 5 , b = 2 , ∝ = 1
attached below is the remaining part of the solution
Briefly explain how Riboflavin deficiency lead to disease state.
Answer:
Severe riboflavin deficiency can impair the metabolism of other nutrients, especially other B vitamins, through diminished levels of flavin coenzymes [3]. Anemia and cataracts can develop if riboflavin deficiency is severe and prolonged [1]. The earlier changes associated with riboflavin deficiency are easily reversed.
Which of the following characteristics differentiates PCM from BWF audio
file formats?
metadata storage
.wav file extension
uncompressed audio file format
compressed audio file format
Answer: A
Explanation:
Answer:
A
Explanation:
In java I need help on this specific code for this lab.
Problem 1:
Create a Class named Array2D with two instance methods:
public double[] rowAvg(int[][] array)
This method will receive a 2D array of integers, and will return a 1D array of doubles containing the average per row of the 2D array argument.
The method will adjust automatically to different sizes of rectangular 2D arrays.
Example: Using the following array for testing:
int [][] testArray =
{
{ 1, 2, 3, 4, 6},
{ 6, 7, 8, 9, 11},
{11, 12, 13, 14, 16}
};
must yield the following results:
Averages per row 1 : 3.20
Averages per row 2 : 8.20
Averages per row 3 : 13.20
While using this other array:
double[][] testArray =
{
{1, 2},
{4, 5},
{7, 8},
{3, 4}
};
must yield the following results:
Averages per row 1 : 1.50
Averages per row 2 : 4.50
Averages per row 3 : 7.50
Averages per row 4 : 3.50
public double[] colAvg(int[][] array)
This method will receive a 2D array of integers, and will return a 1D array of doubles containing the average per column of the 2D array argument.
The method will adjust automatically to different sizes of rectangular 2D arrays.
Example: Using the following array for testing:
int [][] testArray =
{
{ 1, 2, 3, 4, 6},
{ 6, 7, 8, 9, 11},
{11, 12, 13, 14, 16}
};
must yield the following results:
Averages per column 1: 6.00
Averages per column 2: 7.00
Averages per column 3: 8.00
Averages per column 4: 9.00
Averages per column 5: 11.00
While using this other array:
double[][] testArray =
{
{1, 2},
{4, 5},
{7, 8},
{3, 4}
};
must yield the following results:
Averages per column 1: 3.75
Averages per column 2: 4.75
My code is:
public class ArrayDemo2dd
{
public static void main(String[] args)
{
int [][] testArray1 =
{
{1, 2, 3, 4, 6},
{6, 7, 8, 9, 11},
{11, 12, 13, 14, 16}
};
int[][] testArray2 =
{
{1, 2 },
{4, 5},
{7, 8},
{3,4}
};
// The outer loop drives through the array row by row
// testArray1.length has the number of rows or the array
for (int row =0; row < testArray1.length; row++)
{
double sum =0;
// The inner loop uses the same row, then traverses all the columns of that row.
// testArray1[row].length has the number of columns of each row.
for(int col =0 ; col < testArray1[row].length; col++)
{
// An accumulator adds all the elements of each row
sum = sum + testArray1[row][col];
}
//The average per row is calculated dividing the total by the number of columns
System.out.println(sum/testArray1[row].length);
}
} // end of main()
}// end of class
However, it says there's an error... I'm not sure how to exactly do this type of code... So from my understanding do we convert it?
Answer:
Explanation:
The following code is written in Java and creates the two methods as requested each returning the desired double[] array with the averages. Both have been tested as seen in the example below and output the correct output as per the example in the question. they simply need to be added to whatever code you want.
public static double[] rowAvg(int[][] array) {
double result[] = new double[array.length];
for (int x = 0; x < array.length; x++) {
double average = 0;
for (int y = 0; y < array[x].length; y++) {
average += array[x][y];
}
average = average / array[x].length;
result[x] = average;
}
return result;
}
public static double[] colAvg(int[][] array) {
double result[] = new double[array[0].length];
for (int x = 0; x < array[x].length; x++) {
double average = 0;
for (int y = 0; y < array.length; y++) {
average += array[y][x];
}
average = average / array.length;
result[x] = average;
}
return result;
}
Animation timing is does not affect the
speed of the presentation
Select one:
True
False
Answer:
True
Explanation:
I think it's true.....
What is a font?
O How the text for a paragraph appears
O A display of text characters in a specific style and size
O Text that has been made bold
O Artistic elements you can add to text
Think of an aspect of HTML that you found challenging to master. Why is that aspect of HTML important? What are some future situations that you could use it in?
Answer:
html is a thing that u can to create an website business that u can make money on it
Need to compress this IPv6 Address
ad93:a0e4:a9ce:32fc:cba8:15fe:ed90:d768
I can't underatnd your question
SORRY
Explain the paging concept and main disadvantages of pipelined
approaches? Compare the superscalar and super pipelined approaches
with block diagram?
Answer:
PAGINACIÓN En la gestión de memoria con intercambio, cuando ... Debido a que es posible separar los módulos, se hace más fácil la modificación de los mismos. ... Ventajas y Desventajas de la segmentación paginada
Explanation:
Make these negative sentences more positive and polite. Keep the meaning.
1.Don’t run for the bus. You might slip on the ice and fall
2.Don’t tell me what you can’t do.
3.Don’t eat with your mouth open.
4.Don’t submit an incomplete report.
Answer:
You should not run for the bus. You could slip on the ice and fall
Would you stop telling me what you can't do
Could you not eat with your mouth open
You should not submit an incomplete report
Answer:
You should not run for the bus. You could slip on the ice and fall
please stop telling me what you can't do.
please do not eat with your mouth open
you shouldn't submit an incomplete report. it could affect your grades negatively.
Explanation:
hope this helps!
~mina
Write a recursive method called permut that accepts two integers n and r as parameters and returns the number of unique permutations of r items from a group of n items. For given values of n and r, this value P(n, r) can be computed as follows:
n!/(n - r)!
For example , permut (7, 4) should return 840.
Answer:
Following are the code to the given question:
public class Main//defining a class Main
{
static int permut(int n, int r)//defining a method permut that holds two variable
{
return fact(n)/fact(n-r);//use return keyword to return calcuate value
}
static int fact(int n)//defining a fact method as recursive to calculate factorials
{
return n==0?1:n*fact(n-1);//calling the method recursively
}
public static void main(String[] abs)//main function
{
//int n=7,r=4;//defining integer variable
System.out.println(permut(7,4));//use print method to call permut method and print its values
}
}
Output:
840
Explanation:
Following is the explanation for the above code.
Defining a class Main.Inside the class two methods, "permut and fact" were defined, in which the "permut" accepts two values for calculating its permutated value, and the fact is used for calculates factorial values recursively. At the last, the main method is declared, which uses the print method to call "permut" and prints its return values.Acróstico sobre mouse
This lab was designed to teach you more about using Scanner to chop up Strings. Lab Description : Take a group of numbers all on the same line and average the numbers. First, total up all of the numbers. Then, take the total and divide that by the number of numbers. Format the average to three decimal places Sample Data : 9 10 5 20 11 22 33 44 55 66 77 4B 52 29 10D 50 29 D 100 90 95 98 100 97 Files Needed :: Average.java AverageRunner.java Sample Output: 9 10 5 20 average = 11.000 11 22 33 44 55 66 77 average = 44.000 48 52 29 100 50 29 average - 51.333 0 average - 0.000 100 90 95 98 100 97 average - 96.667
Answer:
The program is as follows:
import java.util.*;
public class Main{
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
String score;
System.out.print("Scores: ");
score = input.nextLine();
String[] scores_string = score.split(" ");
double total = 0;
for(int i = 0; i<scores_string.length;i++){
total+= Double.parseDouble(scores_string[i]); }
double average = total/scores_string.length;
System.out.format("Average: %.3f", average); }
}
Explanation:
This declares score as string
String score;
This prompts the user for scores
System.out.print("Scores: ");
This gets the input from the user
score = input.nextLine();
This splits the scores into an array
String[] scores_string = score.split(" ");
This initializes total to 0
double total = 0;
This iterates through the scores
for(int i = 0; i<scores_string.length;i++){
This calculates the sum by first converting each entry to double
total+= Double.parseDouble(scores_string[i]); }
The average is calculated here
double average = total/scores_string.length;
This prints the average
System.out.format("Average: %.3f", average); }
}
Derive the three-dimensional transformation matrix for scaling an object by a scaling factor s in a direction defined by the direction cosines alpha , beta , gamma
Answer:
i dont know
Explanation:
i dont knoe im doing this for the points hehe