You are on page 1of 13

Assignment-1 Binary Search

Mathematical Model

Let, S be the System Such that,


A= {I, O, F, success, failure}
Where,
I= Set of Input
O= Set of Out put
F =Set of Function
Input:
I=Array of the numbers.
Function:
F1=Sorting Function (This function is used for sorting list)
F2= Splitting Function (This function is used for splitting sorted list)
F3= Binary Search (This function apply binary search on sorted list)
Output:
O1=Success Case (It is the case when all the inputs are given by system are entered
correctly)
O2=Failure Case (It is the case when the input does not match the validation Criteria)

F1
O1
I F2
O2
F3
Assignment-2 Quick Sort

Mathematical Model

Quick Sort is basically used to perform sorting on given data. The data is nothing but the
number are taken here as input which are in unsorted order. the number are stored in XML
File

Following parameters are used for Quick Sort:

S= { I, ,F,O, Success, Failure}

I is the set of input element.

O is the set of required output element.

F is the set of functions required for Quick Sort.

Input:

I1= Array of numers

Function:

F= Quicksort Function(choose pivot, up and down and perform a quick sort)

Output:

O ={Sorted list of elements} Success.

Success Sorted list of elements.

F O
I
Assignment-3 Booth Multiplication

Mathematical Model
Booth Multiplication is basically used for multiplication of two binary numbers. Following
parameters are used for Booth Multiplication:

Let, S be the System Such that,


S= {I, F, O, success, failure}
Where,
I = Input
F=Function
O = Output
Input:
I=any two numbers (here we have used decimal)
Function:
F1=main function (contains even and odd phase)
F2=Right Shift if last two bits of number are same in p
F3=P+S or P-S when last two digits of p are not same
Output:
O=answer of multiplication of given input numbers.

F1

I O
F2

F3
Assignment-4 Dining Philosophers Problem

Mathematical Model

Let, S be the System Such that,

S= {I, F, O, success, failure}

Where,

Input:

I1 = Initialization of database/server.

I2 = Initialization of connection with the server.

I3= Programme.

Functions:

F1 = main() : Here we create the threads and assign them to each philosopher and start
their execution.

F2 = run() : This is a function to be written when we use runnable interface for parallel
processing of threads.

F3= eat() : In this function, we lock the neighboring philosopher and the calling
thread(philosopher) stars eating operation.

F4 = think() : In this function, the calling thread(philosopher) starts thinking.

Output:

O1 = Successful completion of the program and output written in database.

Success Case: It is the case the connection is Successful with the MongoDB server and
threads start running parallel and gives output.

O2=Failure Case: It is the case when the connection is failed or there is an exception in
threads.

F1
I1 O1
F2
I2
F3
O2
I3
F4
Assignment-5 Scientific Calculator

Mathematical Model

Let, S be the System Such that,


S= {I, F, O, success}
Where,
I = Input
O = Output
F = Functions
Input:
I=set of numbers (decimal, float)
Function:
F1=Arithmetic Operation
F2= Trigonometric Operation
F3= Logarithmic Operation
Output:
O=Success Case: operation is performed.

F1

I O
F2

F3
Assignment-6 Password Data Encryption

Mathematical Model

Let, S be the System Such that,


S= {I, F, O, success}
Where,
I = Input
O = Output
F = Functions
Input:
I=Plain text.
Function:
F1=Encryption Algorithm (Caesar cipher, Playfair cipher)
Output:
O=Success Case: Converted Cipher text

F O
I
Group B Mathematical Model: - 8 Queen Matrix

Let, S be the System Such that,


S= {I, F, O, success, failure}
Where,
I = Input
O = Output
F = Functions (Under attack() and Solve())
Let N=neighbors array contains the following three items: a, b, c.
If we were to unshift each item using neighbors[i], in the first iteration of the for loop, the
value of a will be added to the first position in our open List. So far so good.
Conditions For 8 Queen Problem:
1)No two Queens should be in Same rows.
2) No two Queens should be in Same column.
3) No two Queens should be in Same diagonal.
Advantage: Backtracking is possible.
Input:
I=Set of 8 quuens in 8*8 matrix.
Function:
F1=In the second iteration, the value of b will be added to the first position in our openList.
F2= openList contains b first, then a: [b, a].
F3=In the third iteration, our openList will look like [c, b, a].
F4=The end result is that the data is reversed, add the items to our OPENLIST in reverse.
First c gets inserted, then b, then a.
Output:
O1=Success Case: It is the case when all the inputs are given by system are entered
correctly and 8-Queen problem is solved.
O2=Failure Case: It is the case when the input does not match the validation Criteria.

F1 O1

F2
I
F3 O2

F4
Assignment-2 Odd-Even Sort
Mathematical Model

Odd Even Sort is basically used for sorting of given data. The data is nothing but here the
number are taken as input in unsorted order.

Following parameters are used for Odd Even Sort:

Let, S be the System Such that,


S= {I, F, O, success, failure}
Where,
I = Input
F=Function
O = Output
Input:
I=array of numbers
Function:
F1=main function (contains even and odd phase)
F2=Even phase
F3=Odd Phase
Output:
O=array in sorted form.
Success Case: It is the case when all the inputs are given by system are entered correctly.

F1

I O
F2

F3
Assignment-3 Scientific Calculator

Mathematical Model

Let, S be the System Such that,


S= {I, F, O, success}
Where,
I = Input
O = Output
F = Functions
Input:
I=set of numbers (decimal, float)
Function:
F1=Arithmetic Operation
F2= Trigonometric Operation
F3= Logarithmic Operation
Output:
O=Success Case: operation is performed.

F1

I O
F2

F3
Assignment-4 Plagiarism Checker

Mathematical Model

Let S be the solution perspective of the class Weather Report such that
S={s, e, i, o, f, success, failure}
s=Start of program
e = the end of program
i= Text Message
o= Plagiarism output
Success- Plagiarism is generated
Failure- Plagiarism is not generated
Computational Model
Elective-III

Assignment-D1 SHA-1

Mathematical Model

Let S be the solution perspective of the class Weather Report such that
S={s, e, i, o, f, success, failure}
s=Start of program
e = the end of program
i=160 bit message.
o=hash value
Success-Hash value is generated.
Failure- Hash value is not generated
Computational Model
Assignment-D3 DSA Signature

MATHEMATICAL MODEL:

Let S be the solution perspective of the class Weather Report such that
S={s, e, i, o, f, success, failure}
s=Start of program
e = the end of program
i=Message
o= Message Digest
Success- Data receive with digital signature
Failure-Not done Message Digest (Data modified)
Computational Model
Assignment-D5

Miller Rabin Test Validate DSA Signature

MATHEMATICAL MODEL:

Let S be the solution perspective of the class Weather Report such that
S= {s, e, i, o, f, success, failure}
s=Start of program
e = the end of program
i=Message
o= Message True or false after Verifying digital signature.
Success- Data receive with digital signature
Failure- Signature not Verified.

You might also like