Time complexity – Head stay transition – Turing Machine

I’m checking time complexity in a turing machine. There is a transition that don’t move the head, it justs stays (not right nor left movement) .

Should I count that state transition to calculate the complexity, -even though- the head don’t move? I understand that it should be counted as that step would take a time unit anyway, but i’m not sure really.

Thanks! Sorry for my english!

Head First Java, 2nd Edition 2nd Edition

View attachment 253039
Get the book here
Learning a complex new language is no easy task especially when it s an object-oriented computer programming language like Java. You might think the problem is your brain. It seems to have a mind of its own, a mind that doesn't always want to take in the dry, technical stuff you're forced to study.

The fact is your brain craves novelty. It's constantly searching, scanning, waiting for something unusual to happen. After all,…​

Head First Java, 2nd Edition 2nd Edition

Getting numerous HEAD requests by Java user agents to resources that require authentication to view within a web application. Should I block them?

I have recently started using Cloudflare’s firewall in front of a web application. This app has a limited user base of selected applicants and they must log in to view anything. There is no public registration form and nothing within the portal can be accessed without an account.

Since moving the DNS to Cloudflare I can see we are receiving numerous daily HEAD requests to paths that are only accessible within the portal.

These requests come from one of two groups of IP addresses from the United States (we are not a US-based company; our own hosting is based in AWS Ireland region and we’re pretty sure at least 99% of our users have never been US-based):

Java User Agents

  • User agent is Java/1.8.0_171 or some other minor update version.
  • The ASN is listed as Digital Ocean.
  • The IP addresses all seem to have had similar behaviour reported previously, almost all against WordPress sites. Note that we’re not using WordPress here.

Empty User Agent

  • No user agent string.
  • The ASN is listed as Amazon Web Services.
  • The IP addresses have very little reported activity and do not seem at all connected to the Java requests.

Other Notes

  • The resources being requested are dynamic URLs containing what are essentially order numbers. We generate new orders every day, and they are visible to everyone using the portal.
  • I was unable to find any of the URLs indexed by Google. They don’t seem to be publicly available anywhere. There is only one publicly accessible page of the site, which is indexed.
  • We have potentially identified one user who seems to have viewed all the pages that are showing up in the firewall logs (we know this because he shows up in our custom analytics for the web app itself). We have a working relationship with our users and we’re almost certain he’s not based in the US.

I am aware that a HEAD request in itself is nothing malicious and that browsers sometimes make HEAD requests. Does the Java user agent, or lack of a user agent in some cases, make this activity suspicious? I already block empty user agents and Java user agents through the firewall, although I think Cloudflare by default blocks Java as part of its browser integrity checks.

Questions

  1. Is there any reason why these might be legitimate requests that I shouldn’t block? The fact it’s a HEAD request from a Java user agent suggests no, right?

  2. One idea we had is that one of the users is sharing links to these internal URLs via some outside channel, to outsource work or something. Is it possible some kind of scraper or something has picked up these links and is spamming them now? As I say, I was unable to find them publicly indexed.

  3. Is it possible the user we think is connected has some sort of malware on their machine which is picking up their browser activity and then making those requests?

  4. Could the user have some sort of software that is completely innocent which would make Java based HEAD requests like this, based on their web browsing activity?

Any advice as to how I should continue this investigation? Or other thoughts about what these requests are?

Could True Polymorph turn a creature like a shark into a object like a dead dragon turtle’s head?

I have a bard that has been true polymorphing into a dragon turtle and attacking coastal towns on a large island (think “Big Island” Hawaii) I am doing this so another member of my party can be true polymorphed into a bronze dragon adult and be seen “fighting” with me.

Our plan is for the fight to go into the ocean, then sometime later he as the bronze dragon will drag a part of a dragon turtle’ body out with him and declare himself their savior and new leader and/or guardian. then true polymorph on him will be dropped, he’ll say he used his dragon shapechange ability to look human. Then he will say he has to keep traveling to “right many wrongs” but that one day he will return.

Then at the end of the campaign if we are still alive, I will permanently make him an adult bronze (around 200 years old) and he will get to spend upwards of 5000 years retired and living as the king of an island nation. Also so he is a sailor background fighter so he plans to slowly reshape them into a sea fairing warrior people like the ancient Maori. He also plans to take a bride from the tribe once every generation till the whole island is full of dragon ancestry sorcerers and half-dragon humans.

We may not need the corpse head of a dragon turtle to pull this deception off we could say it died below the waves but it would help give us trick them and then for centuries the skull of a dragon turtle can adore their main village as a constant reminder of why they should follow him.

How should we define the behavior of a Turing machine where the head tries to move left from the leftmost tape position?

If we have a Turing machine in a model with a tape that is infinite only to the right and assume at some point the head tries to move left from the leftmost position.

How should we define the behavior in such a case? Is a machine doing so for some input not a valid Turing machine? And if so, how can we make sure when we define a Turing machine that this situation can’t occur for any input?

I’ve read some sources about Turing machines though couldn’t find the answer to this specific case, and I see no reason why this case won’t happen for an arbitrary Turing machine and some input.

How can we create someone’s head to collect their bounty?

Last night, we boarded a pirate ship to collect 500g for its captain’s head. The Paladin, being a clever Shield Master boy, shoved him off the edge of the ship for the giant sharks in the water to take care of. After we cleaned up the rest of the crew, we Polymorphed the Paladin to go get the corpse back.

Problem is, we only found the gem-riddled cloak and scimitar the captain was wielding, and bits of his body (a hand and a leg). The rest of him, the sharks got. We need his head to collect his bounty. What options do we have, as a level 13 party with a Vengeance Paladin, Necromancer Wizard, Storm Sorcerer, Samurai Fighter, and Shadow/Chain SorcLock?

We thought we could Resurrect the dude, kill him again, and voilá, we had his dead. But that is not very lucrative to do.

Probabilistic Turing machine – Probability that the head has moved k steps to the right on the work tape

I have a PTM with following transition:

$ \delta(Z_0, \square , 0) = \delta(Z_0, \square , L, R)$ ,

$ \delta(Z_0, \square , 1) = \delta(Z_0, \square , R, R)$

Suppose that this PTM executes n steps. What is the probability that the head has moved k steps to the right on the work tape (in total, i.e., k is the difference between moves to the right and moves to the left) ?

Turing machine on input w tries to move its head past the left end of the tape

Consider the language

$ $ L = \{ \langle M,w \rangle \mid \text{$ M$ on input $ w$ tries to move its head past the left end of the tape}\}. $ $

Prove whether L is decidable or not.

I tried to prove it as undecidable through reduction method but could’nt reduce the language halt to L inorder to prove that it is undecidable.