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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T16:09:07+00:00 2026-05-12T16:09:07+00:00

I am afraid that there might be a situation for which the greedy choice

  • 0

I am afraid that there might be a situation for which the “greedy choice property” might not hold.

For any problem, I can only check for small data-sets. What if, for large data-sets, the property fails?

Can we ever be sure?

  • 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-12T16:09:07+00:00Added an answer on May 12, 2026 at 4:09 pm

    A probably more theoretical way is the proof that your problem has a Matroid structure. If you can proof that your problem has such a structure, there is a greedy algorithm to solve it.

    According to the classical book “Introduction to Algorithms” a matroid a is an ordered pair M = (S,l) with:

    * S is a finite nonemtpy set
    * l is a nonempty family of subsets of S, such that B element of l and 
      A a subset of B than also A is element of l. l is called the independent 
      subsets of S.
    * If A and B are elements of l and A is a smaller cardinality than B, then 
      there is some element x that is in B, but not in A, so that A extended 
      by x is also element of l. That is called exchange property.
    

    Often there is also a weight function w that assigns each element x in S, a weight.

    If you can formulate your function as weighted matroid that the following Python-like pseudocode solves your problem:

    GREEDY(M,w):
       (S,l) = M
       a = {}
       sort S into monotonically decreasing order by weight w
       for x in S:
          if A + {x} in l:
             A = A + {x}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am afraid that this question might be a little too broad, but I
I want so send every week an update by email. But Im afraid that
I'm running a java program that uses many vectors. I'm afraid my use of
I am a little bit stumped with the following problem and I am afraid
We currently use VSS 6, this is not going to change I am afraid.
We have an PHP/MySQL application where the users can create their own databases, which
The two tables below can both hold the same data - a full year,
This might be a stupid question, but if I'm a lone developer and only
I want to create a website which will serve more like a web-application. There
I have a variable that can either be boolean false , or an integer

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.