What's this question even asking? (pick-up and drop-off locations for packages)

  • #1
joshmccraney
Gold Member
2,253
143
This question statement is below, but I can't find out what it's even asking. Any help?

[chegg link redacted by the Mentors after the content was posted below. Please avoid posting low-quality chegg links]
 
Last edited by a moderator:

Answers and Replies

  • #2
Baluncore
Science Advisor
12,339
6,410
1. Drop-off Centers
An e-commerce company, WhatDoYouWant, wants to contract with local businesses to use their stores as pick-up and drop-off locations for their packages. To reduce expenses, they want to ensure that their drop centers are a minimum distance apart from each other.
A city has many potential drop centers (pdcs) to choose from, represented as nodes on a weighted, undirected graph. The edges on this graph denote roads that connect pdcs, with weights representing the lengths of the roads.
Determine how many unique subsets of these companies can be contracted that would satisfy that requirement.
 
  • #3
joshmccraney
Gold Member
2,253
143
1. Drop-off Centers
An e-commerce company, WhatDoYouWant, wants to contract with local businesses to use their stores as pick-up and drop-off locations for their packages. To reduce expenses, they want to ensure that their drop centers are a minimum distance apart from each other.
A city has many potential drop centers (pdcs) to choose from, represented as nodes on a weighted, undirected graph. The edges on this graph denote roads that connect pdcs, with weights representing the lengths of the roads.
Determine how many unique subsets of these companies can be contracted that would satisfy that requirement.
What is the requirement?
 
  • #5
joshmccraney
Gold Member
2,253
143
"they want to ensure that their drop centers are a minimum distance apart from each other."
So like Prim's algorithm?
 
  • #6
36,856
8,899
So like Prim's algorithm?
I don't know anything about Prim's algorithm. You asked "What is that requirement?"
My answer was based on what Baluncore wrote, which I presume came directly from the problem you linked to.
 
  • #7
joshmccraney
Gold Member
2,253
143
I don't know anything about Prim's algorithm. You asked "What is that requirement?"
My answer was based on what Baluncore wrote, which I presume came directly from the problem you linked to.
So for the first triangle shown, would the answer be 5, since all circles are connected with total length 5?
 
  • #8
Baluncore
Science Advisor
12,339
6,410
Does such a poorly posed question deserve such attention ?
Maybe it is just click bait, designed to get you to sign up.
 
  • Like
Likes jim mcnamara, pbuk and joshmccraney
  • #9
pbuk
Science Advisor
Homework Helper
Gold Member
4,084
2,411
The minimum distance is provided as a parameter to the function you must write as your solution. In the example shown the minimum distance is 4. As the distance between nodes 1 and 2 in the diagram for this example is 3 then any subset that includes both nodes 1 and 2 violates the minimum distance constraint. Note that the example is not expressed correctly as there is no graph_weight argument provided; can you work out what it should be given the weights in the diagram?
 
Last edited:
  • #10
pbuk
Science Advisor
Homework Helper
Gold Member
4,084
2,411
Does such a poorly posed question deserve such attention ?
Maybe it is just click bait, designed to get you to sign up.
Chegg seems to be featuring a lot in threads here recently, and also in general internet search results: they must have been pumping it on many levels and obviously plan to make a lot of money. Some of their questions and examples clearly need debugging: do we want to help them do this?
 
Last edited:
  • #11
joshmccraney
Gold Member
2,253
143
Chegg seems to be featuring a lot in threads here recently, and also in general internet search results: they must have been pumping it on many levels and obviously plan to make a lot of money. Some of their questions and examples clearly need debugging: do we want to help them do this?
Well, it's weird because this was literally a coding interview question I had. I obviously didn't take the time to post this until after the interview was complete (not a cheater and honestly no time), but I had no clue what the question was asking. Consequently I didn't even attempt the question. But after the interview I started googling to see what on Earth was being asked. Still don't fully understand, but I'm fine with that.
 
  • #12
Baluncore
Science Advisor
12,339
6,410
Maybe the interviewer found the question on Chegg.com
Maybe they wanted to see how you would react when intimidated by such a poorly posed problem.
 
  • Like
Likes joshmccraney and berkeman
  • #13
joshmccraney
Gold Member
2,253
143
Maybe the interviewer found the question on Chegg.com
Maybe they wanted to see how you would react when intimidated by such a poorly posed problem.
LOLOL it was generated by a computer, and it didn't have the lines and line weights. Also, it used the acronym "pdcs" without definition, along with several other errors. Also, one multiple choice answer about flow charts wasn't available. I even coded it afterwords and nada. The whole process was very weird.
 

Suggested for: What's this question even asking? (pick-up and drop-off locations for packages)

Replies
1
Views
629
  • Last Post
Replies
1
Views
36
  • Last Post
2
Replies
51
Views
2K
Replies
15
Views
1K
  • Last Post
Replies
1
Views
476
Replies
0
Views
261
Replies
29
Views
583
  • Last Post
Replies
5
Views
3K
Replies
1
Views
447
Top