Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7694605
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T21:21:27+00:00 2026-05-31T21:21:27+00:00

While writing a card shuffling algorithm I realized that there are 52! ~= 2^225

  • 0

While writing a card shuffling algorithm I realized that there are 52! ~= 2^225 possible shuffles that can occur. Given this, it seems to me that any shuffling algorithm based on a PRNG with a standard 32 bit or 64 bit seed would only be capable of producing a subset of all possible shuffles. Since my platform only has a 32 bit seeded PRNG (just the POSIX srandom()/random() functions), I was wondering if there is any way to creatively use this to create a shuffling algorithm capable of producing any result. If not, does anyone know of a PRNG algorithm capable of using a seed which is a composite of several 32 bit integers which I could implement myself?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T21:21:29+00:00Added an answer on May 31, 2026 at 9:21 pm

    If you want to solve your problem using the current random number generator, you just have to find a way to divide the parameter space of all possible card shuffles into groups.

    For example, if you had a random seed that could only be 1 through 4, but a parameter space that had 12 possible permutations, you would solve using two random seeds:

    (seed1) defines which parameter group you were in (1-4,5-8, or 9-12)
    (seed2) defines which element is your final result

    (The parameter set does not have to be an even multiple of the seed size for this to work.)

    I used this method for very-large complexity problems in solid-state physics modeling. This is a rigorous mathematical solution, however it may not be the most elegant software solution. Good luck to you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

While writing documentation using Sphinx, I know that I can link to a class
While writing an application that interacts with a database the only way I can
while writing a custom attribute in C# i was wondering if there are any
While writing code in a file that would comprise of PHP, HTML, CSS &
While writing a .jsp file, can i include all the html5 tags in it
I spent a month writing an elaborate payment system that handles both credit card
While writing a simple server-client application, this question came in my mind. When someone
While writing javascript, one can define a method in 3 different ways. 1] A
While writing this line :- define('APPLICATION_ROOT', $_SERVER('DOCUMENT_ROOT') ); in constants.php in CodeIgniter framework of
While writing the touchesBegan handler for my view I ran into this interesting error.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.