Ask Your Question
0

Set Covering Algorithm

asked 7 years ago

Antonio gravatar image

Is there a Sage implementation of the Set Covering Algorithm?

Thanks in advance

Preview: (hide)

Comments

Could you provide a reference to the "Set Covering Algorithm" you mention?

slelievre gravatar imageslelievre ( 7 years ago )

1 Answer

Sort by » oldest newest most voted
1

answered 7 years ago

tmonteil gravatar image

I guess you speak about the "set cover problem", which is a well known NP-hard problem (Karp). Sage does not have this though it could be added as a method of IncidenceStructure.

You can however code it yourself :

  • look at the MixedIntegerProgramming examples and tutorial
  • note that sets are not hashable, so a MIP variable could not be indexed by sets. However, if your sets belong to a list, you just have to index them by their position in the list.
Preview: (hide)
link

Comments

Maybe another option is to index variables by the sorted tuple representing the set?

fidbc gravatar imagefidbc ( 7 years ago )

Thanks, I'm aware of the fact that the set cover problem is NP hard but so is the TSP and Sage has a method for solving these type of problems.

Antonio gravatar imageAntonio ( 7 years ago )

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 7 years ago

Seen: 463 times

Last updated: Sep 09 '17