Open essepuntato opened 1 month ago
2
2
2
The output would be 2.
The result of the execution of the algorithm in Figure 4 using the inputs presented in the question is 2. In fact, both strings ("Peroni" and "HTML") are present in the bibliographic entry. However, an ambiguity could have been raised since "HTML" is present twice in the bibliographic entry. But considering that the algorithm asks if the words are present and not how many times they are present, the final answer is 2.
The result is 2
The result value is 2
The result is 2
2
2
"Peroni" and "HTML" are both present in the bibliographic text thus 0+1=1 1+1=2 The answer is 2
The result of the execution of the algorithm is 2:
2
2
The answer is 2
2
The output would be 2.
Just to get people thinking, HTML appears twice in the bibliographical entry. But the second has a hyphen following it. I presume, then, that the hyphen distinguishes the latter 'HTML' from the former, making it a different and distinct entity?
I am thinking about the 'Find' function in Microsoft Word; inputting a sequence of characters identifies all sequences in the document, not taking into consideration whether these characters seem different from each other visually.
To make this clearer, as an example, when one writes 'de' into the Find box, the algorithm identifies all words with the characters 'de' in them.
Would the algorithm be able to distinguish between the two, despite the fact that the same sequence of characters appears twice? If so, or if not, I guess it depends on the definitions of the algorithm used in the 'Find' function? Or am I mistaken?
(Sorry for the long post, but I thought I should say something about this...!) :)
P.S. I realise @maridematteis has also observed this...
Hi all, thanks for your answers. Indeed, "HTML"
appears two times in the bibliographic entry, but that does not affect the algorithm's operation since it checks if the word (i.e. the string) is present or not in the bibliographic entry. Thus, since it is there (indeed two times!), the answer to the second decision widget of the diagram would be "yes" anyway.
2
What is the result of the execution of the algorithm in Figure 4 of the chapter "Algorithms" using
"Peroni"
,"HTML"
, and"Peroni, S., Osborne, F., Di Iorio, A., Nuzzolese, A. G., Poggi, F., Vitali, F., Motta, E. (2017). Research Articles in Simplified HTML: a Web-first format for HTML-based scholarly articles. PeerJ Computer Science 3: e132. e2513. DOI: https://doi.org/10.7717/peerj-cs.132"
as input values?