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 7852641
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T19:28:20+00:00 2026-06-02T19:28:20+00:00

I need a algorithim to generates a unique hash, not necessirily fixed length, for

  • 0

I need a algorithim to generates a unique hash, not necessirily fixed length, for a integer such that it is independent of permutations of digits.

Like, the hash of 123, 321, 312, 213… should be the same. (Ignore the leading zeroes)

What I tried was to raise every digit to itself and sum up. Like,

Hash(321) = 3**3 + 2**2 + 1**1

Now, I am not sure whether it will generate collissions or not and there is, certainly, a performance issue for large numbers. Any alternatives?

  • 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-06-02T19:28:21+00:00Added an answer on June 2, 2026 at 7:28 pm

    One option: Sort the digits. 123, 321, 312, and 213 all go to 123.

    Another option: Use a vector of the counts of each digit as the hash. 123, 321, 312, and 213 all go to [0,1,1,1,0,0,0,0,0,0].

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

Sidebar

Related Questions

I need to generate unique non-sequential alphanumeric string of exactly length 6 (not less,
I have a large and unique integer (actually a SHA1 hash). Note: While I'm
I need to write an algorithm that reads keyboard stream until it gets a
I need a cross-platform library/algorithm that will convert between 32-bit and 16-bit floating point
I want a number that would be unique forever, I came up with the
I need an algorithm that can do a one-to-one mapping (ie. no collision) of
I have to implement an algorithm that generates a timetable for a university. I've
I've been looking for a Classic ASP script that allows me to hash a
For an application I need to generate unique serial numbers for each English word.
I have an algorithm that generates strings based on a list of input words.

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.