What is the correct punctuation of something like "constant factor competitive algorithm"? This is a term that frequently appears in computer science articles, and I have seen it written in multiple ways.

Here "constant factor competitive" is a property of an algorithm. The algorithm is "competitive", but the kind of competitiveness is further specified as being "constant factor".

Logically I would write it "constant-factor-competitive algorithm", but it looks a bit suspicious. Maybe "constant-factor competitive algorithm"?

• It seems to me you can have a "constant-factor algorithm" and a "competitive algorithm", so if an algorithm has both attributes I'd call it a "constant-factor competitive algorithm". But only 2 out of 4 written instances in Google Books do this. The other two don't bother hyphenating at all (but that doesn't seem unreasonable to me anyway). Using two hyphens just looks distractingly "fussy". – FumbleFingers Nov 11 '15 at 18:09
• I'd like the fussy two hyphens to give me a clue that the algorithm is (constant factor competetive) rather than both (constant factor) and (competetive). Or even constant and (factor competetive). – Edwin Ashworth Nov 11 '15 at 18:27

Both constant-factor and competitive can describe an algorithm separately and in other compound adjectives (e.g., "constant-factor approximation or "throughput-competitive").

So, you can punctuate them as either "constant-factor, competitive algorithm" or "constant-factor competitive algorithm" though. Some examples of both comma and no comma algorithm titles in published articles: here, here, and here.

Hyphen use on the first word indicates it is compound and comma use between your adjectives just separates them, of course. Using both simply adds to the readability of long titles like these.

See Apoorva's answer for why you might want to separate with a comma:

(1) Can you replace the comma with the word and?

(2) Can you reverse the order of the adjectives and keep the same meaning?

If the paired adjectives fail the two-part test, then no comma is used. This shows that they must remain in a certain order to make sense. These are called cumulative adjectives.

If two adjectives modify a noun in the same way, place a comma between the two adjectives. These are called coordinate adjectives.

• Also, these questions are nice, and this example definitely fails both tests: (1) "constant-factor and competitive" - this would definitely NOT work. (2) competitive constant-factor - this would also make no sense. – László Kozma Dec 15 '15 at 9:50
• Just to make it clearer, I take issue with your first paragraph, constant-factor cannot really describe an algorithm, it can refer to "competitiveness", "approximation", etc. – László Kozma Dec 15 '15 at 9:51
• Thanks, this is useful. But I would like to mention that "constant-factor" does not really describe an algorithm, but the competitiveness, so the variant "constant-factor, competitive algorithm" would definitely not work. In your first example title, "constant-factor" describes "approximation". In the second example, the comma works because "competitive" is really an attribute of "algorithm" – László Kozma Dec 15 '15 at 9:56