why don't you try a brute force technique through a simple program,to
see what it's gonna happen.You have a 4 nested loop(O(n^4))
e.g
number x=abcd
for(a=1t o 9) do
   {for(b=1 to 9)do
    {for(c=1 to 9)do
       {for (d=1 to 9)do
    {   y=1000*a+100*b+10*c+d;
    if prime(y) and prime(permute(z)) print(z);
}
you can you array represantation to lessen the computational burden


where prime(int) is a function to check if a given number prime
permute(int) is  a module that can implement lexicographical order of
it's input and check(again by brute force) every listed number (and
delete it's rightmost digit one per time)
}}}


}
it is just anaive approach...not something sophisticated

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/algogeeks
-~----------~----~----~----~------~----~------~--~---

Reply via email to