Showing posts from February 18, 2024

DIJKSTRAS code in C language

#include<stdio.h> #include<conio.h> #define member 1 #define nomember 0 #define infinity 999 typedef struct edge { int wt; }edge; int n; edge g[10][10]; /* The main function Parameter Passing Method :None Called By : The O.S. Calls…

Algebraic structure & its 6 properties abelian or not examples

ALGEBRAIC STRUCTURES Algebraic Structure (Set + Operation + Rules) A non empty set S is called an algebraic structure w.r.t binary operation (*) if it follows following axiom (rules): 1) Closure : (a*b) belongs to S for all a, b ∈ S. Ex : S = {1,-1}…

Prims Program in C language

//  Prims Program in C language #include<stdio.h> #include<conio.h> #include<stdlib.h> #define size 8 int cost[size][size]={0},n=0; /* The get_mat function-for creating the adjacency matrix Input :none Output:none Parameter Passing M…

Program is for Kruskal's minimum spanning tree algorithm in C language.

/* *******************************************************************************   This Program is for obtaining the Minimum Spanning Tree by using Kruskal's  minimum spanning tree algorithm . The graph is an weighted undirected graph.  The grap…

Random Variables & Expected value of a Disrete Random Variables Examples

Random Variables Definition:  • A random variable is a function of an outcome, X = f(ω).  • That is, each possible value of X represents an event that is a subset of the sample space for the given experiment.   • The domain of a random variable i…

Conditional probability examples

Conditional Probability   • Definition          • The conditional probability of A given B, denoted P(A / B).          • It is the probability of event A has when it is known that event B has already occurred. •  Rule for Condition           • al…

Intersection & union of events examples of probability

Intersection of Events    •The intersection of events A and B, denoted A ∩ B, is the collection of all outcomes that are elements of both of the sets A and B.   •It corresponds to combining descriptions of the two events using the word “and.” Examp…

Probability of an event & complement examples

Probability of an event  • The probability of an event A is the sum of the probabilities of the individual outcomes of which it is composed. It is denoted P(A).  • If an event A is A={e1 ,e2 ,…,ek },  then • P(A)=P(e1 )+P(e2 )+ ⋅ ⋅ ⋅ +P(ek) Ex…

Load More
That is All