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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T02:51:57+00:00 2026-05-15T02:51:57+00:00

Let me describe the system. There are several mobile devices, each independent from each

  • 0

Let me describe the system. There are several mobile devices, each independent from each other, and they are generating content for the same record id.
I want to avoid generating the same content for the same record on different devices, for this I though I would use a random and make it so too cluster the content pool based on these randoms.

Suppose you have choices from 1 to 100.

Day 1

  • Device#1 will choose for the record#33 between 1-10
  • Device#2 will choose for the record#33 between 40-50
  • Device#3 will choose for the record#33 between 50-60
  • Device#1 will choose for the record#55 between 40-50
  • Device#2 will choose for the record#55 between 1-10
  • Device#3 will choose for the record#55 between 10-20

  • Device#1 will choose for the record#11 between 1-10

  • Device#2 will choose for the record#22 between 1-10
  • Device#3 will choose for the record#99 between 1-10

Day 2

  • Device#1 will choose for the record#33 between 90-100
  • Device#2 will choose for the record#33 between 1-10
  • Device#3 will choose for the record#33 between 50-60

They don’t have access to a central server.
Data available for each of them:

  • IMEI (unique per mobile)
  • Date of today (same on all devices)
  • Record id (same on all devices)

What do you think, how is it possible?

ps. tags can be edited

  • 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-15T02:51:58+00:00Added an answer on May 15, 2026 at 2:51 am

    I agree with AakashM and Frustrated. First can you guarantee that the number of devices is greater than the range of generated data? In fact to be “Random” you really need to have twice the generated content as devices, otherwise at least one device will have to “randomly choose” between one choice. That stated since the IMEI is the only unique data based on the device you will have to use that in your algorithm. The other problem (I suspect) is that the device IDs are not necessarily evenly distributed so any potential mapping of a device ID to a data block would potentially lead to overlap (unless you have a very large range of data to select from) or the values generated would not be evenly distributed across the pool of devices.

    That said here is a rough algorithm:

    1. Create a mapping of the IMEI to an integer (i.e. some kind of hash)
    2. Rotate that integer based on the date and the size of possible values generated in step
    3. Map the number resultant from 2 to a range of data values based on the ratio of IMEIs to value range created by step #1.
    4. Use the standard random number to select something from that range

    A simple example using the IMEI as a single byte and a data range of 0->2559:

    1. Mapping is direct based on IMEI, so base = IMEI
    2. Date translation is based on #of days since epoch. For this example say 700 then base = (9(original base: Mapped IMEI)+700(# of days)) % 255(range of mapped IMEI value) = 199
    3. Data range is 10 times mapped value range, so each block may use 10 values, resultant data range from 2 becomes 1990 ->1999 (inclusive).
    4. Select a standard random value in the block data range (i.e. 4, as chosen by fair dice roll) value = 1990+4=1994.

    Finally if you want the ranges to differ based on the record you could use that as a second offset as was done in step #2.

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

Sidebar

Related Questions

Let me describe my application , I am fetching data from the website JSON
Let me describe the behavior I get: Load a user from the database: this
Let me describe a simple use-case: Running all tests in our project may take
Well this is weird let me describe the scenario I have this mailer define
Thanks for viewing my question. Let me describe the app first. I have a
I have a problem with forwarding to a .jsp page. Let me describe my
Let me first describe my goal: I have created an object with 3 properties:
I'll let this jsfiddle describe most of the problem for me. http://jsfiddle.net/zAPVQ/4/ I've got
I've got a strange problem. Let me first describe my situation: Webserver01 (Webapplication, SQL,
I'm possibly confusing rack and capybara methods here let!(:admin){FactoryGirl.create(:admin)} # test passes describe visiting

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.