1answer.
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
Rashid [163]
3 years ago
11

Give a recursive algorithm MATRIX-CHAIN-MULTIPLY (A, s, i, j) that actually performs the optimal matrix-chain multiplication, gi

ven the sequence of matrices.
â¨A1,A2,....,Anâ©

the s table computed by MATRIX-CHAIN-ORDER, and the indices i and j. (The initial call would be MATRIX-CHAIN-MULTIPLY (A, s, 1, n).)
Computers and Technology
1 answer:
juin [17]3 years ago
7 0

Answer:

Follows are the code to this question:

MATRIX_CHAIN_MULTIPLY(A,s,i,j)//defining a method MATRIX_CHAIN_MULTIPLY that accepts 4 parameters

if(i == j)//use if block to check i and j value is equal

 return A[i]//return array values

if(j == i+1)//use another if block to check j value is equal to incrementing value of i

 return A[i]*A[j];//return multiplication of array

else//defining else block

 x1 = MATRIX_CHAIN_MULTIPLY(A,s,i,S[i,j])//x1 variable to call above method

 x2 = MATRIX_CHAIN_MULTIPLY(A,s,S[i,j]+1,j)//x2 variable to call above method

 return B1*B2//return multiplication of method holding value

Explanation:

Please find the attached file of the complete question:

In the code, a method "MATRIX_CHAIN_MULTIPLY" is declared, which accepts parameters and uses a conditional statement to check value, which can be defined as follows:

  • In the first, if block, it checks the variable "i and j" value that is equal if it is true it will return an array.
  • In the second if it checks variable j value is equal to incrementing the value of i, if this is true it will return multiplication of array.
  • In the else block two-variable "x1, x2" is used that calls the above method and returns its multiplicating value.

You might be interested in
V.kofiryfh givnyovb (to slove you must go back 3 letters)
Elena L [17]
Im goin to be honest with you i dont understand this question at all can you xplain it alittle more plz cuz if i go back three letters it is o
7 0
3 years ago
Hey, how do we get our warnings removed?
Effectus [21]

Answer:

post good answers

Explanation:

6 0
2 years ago
Read 2 more answers
What type of switch can have VLANs set up on it?<br> Gigabit<br> Managed<br> Trunk<br> Unmanaged
sweet-ann [11.9K]

Answer:

Trunk

Explanation:

Gigabit switches are meant for expanding the ethernet. Through this, you can add more PC to the ethernet. A managed switch is meant for providing more tailored features and tools to the users. The unmanaged switch only allows the two devices on the network to communicate with each other, as it just provides the connectivity. And for setting up the VLANs on it, we need the Trunk Switch. And hence, the correct option is Trunk.

7 0
3 years ago
The relationship between social media and the Internet is complex. Individual Internet behavior involves a myriad of factors tha
Artemon [7]

Answer:

Explanation:

The internet could be regarded has a marketplace or platform which gives individuals, businesses the opportunity to interact, relate, access opportunities, learn in an easy manner with the help of a data connection. The internet has redefined the process and concept of acesing information and interaction with the ease and coverage it brings. The Social media is could be seen a part of the internet platform which allows people to relate and interact, make friends, promote brands and so on. The internet and social media platforms however, in spite of its huge benefits comes with its inherent risk. Including the surge in cyber crime, immorality and information theft to mention a few. Common scenarios whereby banking details are being stolen from databases resulting in wholesale illegal transfer of funds. Issues of blackmail and violent defamation by groups of cohorts has also been a con in the advent of internet and social media, including growing trends of fake news which usually escalate tension, in which the recent unrest in my vicinity benefitted negatively from.

7 0
3 years ago
If you are to recommend type of cloud for a education institutions (e.g universities), which one would you choose? (private or p
Bas_tet [7]

Answer:Private cloud

Explanation: Education institute require some kind of security and reliability for their data so that it can remain secure between the students and the staff only and no unauthorized access can be done.

The setting up of the private cloud is a better method for sharing of the information among the institute because it is controlled by the internal sources only ,unlike the public cloud.This service enhances the security and is accessible by the organization members only with the on-request service feature.

3 0
4 years ago
Other questions:
  • An application that can be launched from my web browser is known as a _____. java applet spreadsheet cad software music applicat
    14·1 answer
  • Can someone help me with these questions on linear dimensions pls
    11·2 answers
  • In the early days of photography, cameras were limited to professional photographers because of the knowledge needed to work the
    15·2 answers
  • (Package Inheritance Hierarchy) Package-delivery services, such as FedEx®, DHL® and UPS®, offer a number of different shipping o
    10·1 answer
  • Which of the following occurs when the amount of money earned is greater than the
    5·1 answer
  • Should a waiting thread receive priority over a thread first attempting to enter a monitor? What priority scheme, if any, should
    9·1 answer
  • Free Write Friday 2/26/21
    8·1 answer
  • Here you guys go im back didnt die or any thing gg for who ever gets this
    11·2 answers
  • Using language c, find the nth Fibonacci, knowing that nth Fibonacci is calculated by the following formula: - If n = 1 Or n = 2
    9·1 answer
  • How will bits and bytes of computer networking help in my career goal?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!