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

  • Home
  • SEARCH
  • 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 6033419
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T05:28:49+00:00 2026-05-23T05:28:49+00:00

i got a bit of a problem. I’ve got an input: /0-9/0-9/0-9/0-9. in this

  • 0

i got a bit of a problem.

I’ve got an input: “/0-9/0-9/0-9/0-9”. in this case its 10^4 possibilities.

my program analyze it and calculate all the permutations, and prints the output. in our case the output is:
0001
0002
.
.
.
9999

the problem is that i have a server application (written in c#) that receives this input, and suppose to split the task of the calculation evenly between the connected clients. in the end each client need to print his part.

the limitation is that the format of the task sent by the server to the client must be in the format “/#-#/#-#/#-#/#-#/”
server can send more then one task to each client providing all the clients get same number of tasks.

one more example:
i got two connected clients. and my input is /0-9/0-9/0-9/0-9/
so i’ll send:

clinet1: /0-4/0-9/0-9/0-9/

clinet2: /5-9/0-9/0-9/0-9/

how do i split evenly between n clients?

tnx

  • 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-23T05:28:50+00:00Added an answer on May 23, 2026 at 5:28 am

    I would approach this by figuring out how many of the 10^4 possibilities each client needs to solve if you were to distribute the items evenly:

    Items per client = 10^4 / N
    

    Say N = 20, then Items per client = 500. So now you need to break up the input into groups of 500

    0-0/0-4/0-9/0-9  (0 - 499)
    0-0/5-9/0-9/0-9  (500 - 999)
    1-1/0-4/0-9/0-9  (1000 - 1499)
    1-1/5-9/0-9/0-9  (1500 - 1999)
    2-2/0-4/0-9/0-9  (2000 - 2499)
    etc etc
    

    This becomes a little messier when N does not divide evenly into 10^4 but you can simply round the # of jobs to send to each client up so that clients occasionally overlap on jobs at the endpoints of the intervals

    Edit: Example if N = 3 then Items per client = 3333.333. Then round this down to 3000 each and have the last one do 4000

    Client 1: 0-2/0-9/0-9/0-9
    Client 2: 3-5/0-9/0-9/0-9
    Client 3: 6-9/0-9/0-9/0-9
    

    You could generalize this algorithm to split up the items evenly. If N is between 1-10 then you will be splitting the first interval. If N is between 11-100 then you will be splitting the 2nd interval. If N is between 101 – 1000 you will be splitting on the 3rd interval

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

Sidebar

Related Questions

ok i got this problem. i have this routes: (code bit change) File:/home/dotcloud/current/config/routes.js exports.routes
I've got a bit problem. My program throws segmentation fault when returning zero in
This will seem like an odd problem to have. I've got this bit of
Problem solved, thank you all for the help I've got a bit of a
I've got a bit of a problem creating a navigation element - its working
got a bit of a small problem here. I've been following this tutorial which
So I've got a bit of a problem here. This script works fine in
I've got a bit of a problem with making my data loading and filtering
I've got a bit of a problem. Essentially, I need to store a large
I've got this bit of JQUERY: <script> function initNav() { $('.nav tr table td

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.