Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello, Im trying to program warshalls algorithum in java but an running into an error can someone please help. Assume an N by N Boolean

Hello,

Im trying to program warshalls algorithum in java but an running into an error can someone please help.

Assume an N by N Boolean Matrix Representation for a transitive Boolean relation. Warshalls Algorithm generates the transitive closure.

import java.util.*;

public class Trendz {

public static void main (String args[]){

int i;

int j;

int k;

int N;

int Arr[];

for ( i = 0; i < N ; i++ ){

for ( j = 0 ; j < N ; i++){

if( Arr[j,i] == true){ // <<<< error happening here!

for ( k = 0; k < N ; k++){

Arr[j,k] == A[j,k];

}

}

}

}

}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Students also viewed these Databases questions