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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:34:03+00:00 2026-05-26T23:34:03+00:00

My question is about an old transportation problem — carrying three items across a

  • 0

My question is about an old transportation problem — carrying three items across a river with a boat only capable of tranferring one item at a time. A constraint is certain items cannot be left together, such as the cabbage with the goat, wolf with the goat etc. This problem should be solveable using Integer programming, or another optimization approach. The cost function is all items being on the other side of the river, and the trips required to get there could be the output from Simplex (?) that tries out different feasible solutions. I was wondering if anyone has the Integer Programming (or Linear Programming) formulation of this problem, and / or Matlab, Octave, Python based code that can offer the solution programmatically, including a trace of Simplex trying out all paths — our boat rides.

There was some interesting stuff here

http://www.zib.de/Publications/Reports/SC-95-27.pdf

Thanks,

  • 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-26T23:34:04+00:00Added an answer on May 26, 2026 at 11:34 pm

    I recommend using binary variables x_i,t to model the positions of your items, i.e. they are zero if the item is located on the left shore after trip t and one otherwise. At most one of these variables can change during a trip. This can be modeled by

    x_wolf,1 + x_cabbage,1 + x_goat,1 <= 1 + x_wolf,0 + x_cabbage,0 + x_goat,0 and

    x_wolf,1 >= x_wolf,0

    x_cabbage,1 >= x_cabbage,0

    x_goat,1 >= x_goat,0

    Similar constraints are required for trips in the other direction.

    Furthermore, after an odd number of trips you nedd constraints to check the items on the left shore, and similarily you have to check the right shore. For instance:

    x_wolf,1 + x_goat,1 >= 0 and

    x_wolf,2 + x_goat,2 <= 1 …

    Use an upper bound for t, such that a solution is surely possible.

    Finally, introduce the binary variable z_t and let

    z_t <= 1/3 (x_wolf,t + x_cabbage,t + x_goat,t)

    and maximize sum_t (z_t).

    (Most probably sum_t (x_wolf,t + x_cabbage,t + x_goat,t) shold work too.)

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

Sidebar

Related Questions

Similar to this problem here: Old Question about C# debugging I'm trying to debug
I am a bit confused about old/new so that's my question. What is the
I've got a question about opening the old project in VS2008. If I have
This is a question about an algorithm to solve a graph theory problem. Let
I asked this question about rewriting old ugly links into seo friendly ones. I
In a previous question about ridding the system tray of an old NotifyIcon I
This is not the same old question about the validators and update panel compatibility.
Here is another question about convert old code to D2009 and Unicode. I'm certain
This is a follow up to my previous question (about an old top coder
Here there's an old question about this code. xmpp.OnLogin += delegate(object o) { xmpp.Send(

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.