#include<stdio.h>
#include<conio.h>
#include<string.h>
void min(int[],int,int[][],int);
void main()
{
int s[20][20],i,j,n,ne[20][20],k=0,d[20],z[20][2],e[20];
char nam[20],r;
clrscr();
printf("enter no.of routers in the subnet:");
scanf("%d",&n);
printf("Enter the adjacency matrix\n");
for(i=0;i<n;i++)
for(j=0;j<n;j++)
scanf("%d",&s[i][j]);
printf("Which routers routing table you want to construct:");
scanf(%c",&r);
printf("the neighbours of c are:",r);
for(i=0;i<n;i++)
if(s[r-65][i]==1)
{
printf("%c",i+65);
nam[k++]=i+65;
}
printf("\n");
for(i=0;i<k;i++)
{
printf("Enter %c%c delay:",r,nam[i]);
scanf("%d",&d[i]);
}
for(i=0;i<k;i++)
{
printf("\n Enter %c's routing table \n",nam[i]);
for(j=0;j<n;j++)
scanf("%d",&ne[i][j];
}
for(i=0;i<n;i++)
{
for(j=0;j<k;j++)
e[j]=ne[i][j]+d[j];
min(e,k,z,i);
}
clrscr();
printf("To");
for(i=0;i<k;i++)
printf("%c\t",nam[i]);
printf("NEW TABLE FOR %c ",r);
printf("\n");
for(i=0;i<k;i++)
printf("......");
printf("..............");
for(i=0;i<n;i++)
{
printf("\n");
printf("%c|",i+65);
for(j=0;j<k;j++)
printf("%d\t",ne[j][i]);
if(r==(i+65))
printf("0\t-);
else
{
printf("%d\t",z[i][0]);
printf("%c\t",nam[z[i][1]]);
}
}
}
void min(int e[20],int k,int z[20][2],int i)
{
int b;
z[i][0]=e[0];
z[i][1]=0;
for(b=1;b<k;b++)
if(e[b]<z[i][0])
{
z[i][1]=0;
for(b=1;b<k;b++)
if(e[b]<z[i][0])
{
z[i][0]=e[b];
z[i][1]=b;
}
}
An example graph for distance and time would typically be a straight line if the object is moving at a constant speed, indicating a linear relationship between distance and time. The x-axis would represent time, while the y-axis would represent distance. If the object is stationary, the line would be flat, showing no change in distance over time. If the object accelerates, the line would curve upwards, indicating increasing distance over time.
An example of a second chance page replacement algorithm in operating systems is the Clock algorithm. This algorithm works by using a circular list of pages and a "use" bit for each page. When a page needs to be replaced, the algorithm checks the "use" bit of each page in the list. If the bit is set, indicating the page has been recently used, the algorithm clears the bit and moves to the next page. This process continues until a page with a cleared "use" bit is found, which is then replaced.
A speed measurement indicating the distance traveled in an hour.
I've never heard the term "finiteness" applied to an algorithm, but I think that's because the definition of an algorithm includes that it must be finite. So think of any algorithm and there is your example of finiteness.
fdf
One inch on a map is an example of a scale representation, indicating the relationship between distance on the map and actual distance in the real world. For instance, it may represent a specific number of miles or kilometers, allowing users to measure distances accurately. This scale helps in navigation and understanding geographical layouts.
Distance between speakers
There is not "a" greedy algorithm; "greedy algorithm" is a term to describe several algorithms that have some things in common. The general idea is that at each step, you look for what seems to be, "locally", the best solution. For example, in a shortest-distance problem, look for a step that takes you closer to the destination. This may, or may not, lead to the best solution overall.
An example of wavelength is the distance between two consecutive peaks of a wave, such as the distance between two successive crests of an ocean wave or two peaks of a sound wave. In electromagnetic radiation, the wavelength is the distance between two successive peaks of the wave, like the distance between two peaks of a light wave.
It is 28 (for example km)
distance between speakers (apex )
If you mean "Algorithm" an algorithm is simply a set of rules, or steps to complete, which are needed to solve a particular problem. An example would be a recipe in a cookbook. A recipe is an algorithm.