C,C++/JAVA/BASH/ASM ARENA

वह प्रदीप जो दीख रहा है झिलमिल दूर नही है थक कर बैठ गये क्या भाई मन्जिल दूर नही है चिन्गारी बन गयी लहू की बून्द गिरी जो पग से चमक रहे पीछे मुड देखो चरण-चिनह जगमग से बाकी होश तभी तक, जब तक जलता तूर नही है थक कर बैठ गये क्या भाई मन्जिल दूर नही है अपनी हड्डी की मशाल से हृदय चीरते तम का, सारी रात चले तुम दुख झेलते कुलिश का। एक खेय है शेष, किसी विध पार उसे कर जाओ; वह देखो, उस पार चमकता है मन्दिर प्रियतम का। आकर इतना पास फिरे, वह सच्चा शूर नहीं है; थककर बैठ गये क्या भाई! मंज़िल दूर नहीं है। दिशा दीप्त हो उठी प्राप्त कर पुण्य-प्रकाश तुम्हारा, लिखा जा चुका अनल-अक्षरों में इतिहास तुम्हारा। जिस मिट्टी ने लहू पिया, वह फूल खिलाएगी ही, अम्बर पर घन बन छाएगा ही उच्छ्वास तुम्हारा। और अधिक ले जाँच, देवता इतन क्रूर नहीं है। थककर बैठ गये क्या भाई! मंज़िल दूर नहीं है।

Microprocessor8085 July 31, 2009

Filed under: Uncategorized — whoami @ 15:03

WHY DO WE USE RST INST. IN KITS/8085 MP BOARDS? WHY DONT WE USE HLT .?

Ans:

Halt simply stops the processor from executing more program commands. Reset (RST) does not stop execution, it only transfers it to a vector location (where is keeps on going).

Executing a Halt will still require Reset for the processor to continue operation.

Advertisements
 

Fedora – javac installation July 30, 2009

Filed under: Uncategorized — whoami @ 19:15

The following command helped me install javac once aggain on my fedora.

yum install java-1.6.0-openjdk-devel

its really difficult some time to install javac in fedora, though in ubuntu its an easy process.

 

Miller-Rabin randomized primality test July 18, 2009

Filed under: Uncategorized — whoami @ 23:04

The Miller – Rabin primality test overcomes the problems of the simple test PSEUDOPRIME with two modifications:-

1. It tries several randomly chosen base values a instead of just one base value.

2. while computing each modular exponentiastion , it notices if a nontrivial square root of 1, modulo n, is discovered during  the final set of squarings. If so , it  stops and outputs COMPOSITE.

MILLER- RABIN(n,s)

1. for j=1 to s

2      do  a= RANDOM(1,n-1)

3.        if WITNESS(a,n)

4.           then return COMPOSITE

5. return PRIME

WITNESS(a,n)

1.let n-1=2^t   . u , where t>=1 and u is odd

2.xo=MODULAR-EXPONNETIATION(a,u,n)

3.for j=1 to t

4     do xi=xi^2 mod n

5.       if xi=1 and xi-1!=1 and xi-1 != n-1

6.        then  return  TRUE

7.if xt!=1

8   then return TRUE

9 return FALSE

 

Pseudoprimality Testing

Filed under: Uncategorized — whoami @ 22:45

we say that n is a base-a pseudoprime if n is composite and

a^(n-1)= ( mod n)

Algorithm:

1. if MODULAR-EXPONENTIAN(2,n-1,n)!= 1( mod n)

2.    then  return COMPOSITE

3.    else return PRIME

This procedure gives erroneous result only for some values . There r only 22 values of n less than 10,000 for which it gives rong result the first 4  such  values r  341,561,645 and 1105.

 

Algo -Mania

Filed under: Uncategorized — whoami @ 21:39

This is the topic on which three indian students created history by giving AKS algorithm.

The topic is very interseting.This is the problem to find large primes. Cryptography requires the implentation

of larger primes. The prime distribution function pie(n) specifies the number of primes that r less than or equal to n. e.g pi(10)=4, since there r 4 primes numbers less than or equal to 10., namely 2,3, 5,7. so the ttheorem

prime number theorem:

lim(n-> infinity) pi(n)/(n/ln n) =1

we can use the prime number theorem to estimate the probability that a randomly chosen integer n will turn out to be prime as   1/ln n .

One simple approach to the problem of testing for primality is trial division. We try dividing n by each integer 2, 3,….sqrt(n). Again , even integers greater than 2 may be skipped.

Demerit : It is easy to see that trial division works well only if n is very small or happen to have small prime factor.

We will se further that computing the prime factorization of a number is compuationally expensive. It is perhaps surprising that it is  much easier to tell whetther or not a given number is prime than it is to detemine the prime factorization of the number if it is not prime.

rest we will talk about Pseudoprimality Testing

 

Hello world! July 12, 2009

Filed under: Uncategorized — whoami @ 17:58

yeah , this one is required i will not add nutrients to it. This topic is required in the blog

 

WROTE things , but they disappeared……..

Filed under: Uncategorized — whoami @ 13:40

dont no where the contents are gone………..