Skip to main content
5 votes
Accepted

Is a 'base' file always necessary when doing a merge?

Without a base file (a common ancestor of the files you want to merge) an automated algorithm can only tell that there is a difference between A and B, but it cannot tell if that is because A added ...
Bart van Ingen Schenau's user avatar
2 votes

Is a 'base' file always necessary when doing a merge?

Except in special cases (for example you know that lines were only added - not deleted or changed) you need three versions of a file to do an automated merge. However it is not necessary for one of ...
DavidT's user avatar
  • 3,348
1 vote
Accepted

Concatenating strings given a BNF grammar

A production rule for an empty string (or equivalently an empty token) can always succeed by consuming nothing from the input. So, when you peek '(', the parser first tries the production <Letter&...
Bart van Ingen Schenau's user avatar
1 vote

NP-complete problem (subset sum) featured in Netflix series "Suits" S1 E8?

I know that 30 years ago, if you made a payment to the German Inland Revenue, they would check if that payment matched exactly the sum of 1, 2 or 3 amounts that you owed them, and in that case marked ...
gnasher729's user avatar
  • 45.8k
1 vote
Accepted

NP-complete problem (subset sum) featured in Netflix series "Suits" S1 E8?

NP-complete problems are only unsolvable in the limit. As you state, exponential effort is entirely achievable if the basis is not too large. The question how large it can get depends on the state of ...
Kilian Foth's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible