Can you verify a word’s position in an enumeration faster than performing the enumeration?

Pt 1. Given as input the tuple: (word, natural number)–does there exist a verifier, that runs faster than a fixed enumerator, that can accept if the word is in the position of the natural number in the enumeration by the fixed enumerator, and reject if it is not?

I suspect the answer is no. In that case…

Pt 2. Is there a way to get around this by adding a “tagging” function to the enumerator so that a verifier can be given something like (word#tag, natural number) so that it almost immediately knows, from the tag, if the word is in the position of the natural number (do there exist such ‘modified languages’) AND IT CAN’T BE FOOLED! Of course you can stick a natural number onto a word, but how can you do this so the verifier can BE SURE you aren’t lying…? Trying to figure out a way to tag the words (or generate a description for the words in a language (modify the language being enumerated/the enumerator)) so that stuck on to the words enumerated is the positions their the enumeration, and this information is reliable and can be verified quickly.

Any ideas? 🙂

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.

John the Ripper / Hashcat rule, reject candidate if char at position X is the same as character at position Y

I’m using John to generate some word lists and I’m trying to figure out the most optimized way to do the next step. What I want to do is add ever possible 3 digit number to a set where the first digit of the number is not the same as the first digit in the set

Set example 123ABC

to add

+ 213 = 123ABC213 OK

+ 131 = 123ABC131 REJECT

I see rules that reject unless a string includes, but not a comparison function like this.

I could make the whole list and prune it after with a python script, but it would be way bigger than needed.

Thank you!

3-Approximation for General position subset

I am currently studying for an exam and stumbled upon the following task: Given the following problem:

Input A set of points $ P \subseteq \mathcal{Q}^2$ and $ k \in \mathbb{N}$

Question Find the maximum subset $ S \subseteq P$ such that no three points in $ S$ are collinear.

The task is to find a polynomial time 3-approximation algorithm that is an algorithm that deletes at most $ 3$ -times as many points as an optimal solution. Unfortunately, I am totally clueless here. How would such an algorithm look like?

Wrong Second position of LineRenderer

I’m drawing some kind of bullet trace effect with LineRenderer in my 2D Game Project with Unity. At some position, setting position of LineRender result weird:

enter image description here

In the above screenshot, you can see two types of lines are exists. Pure red lines are result of Debug.DrawRay which is only renders in Scene view, not actual game play, and another lines which has yellow to red gradient are actual line renders I want to draw.

I used exactly same code for rendering both two, Debug.DrawRay() and LineRenderer.SetPosition(), but as you can see only DrawRay works as I expected and LineRenderers are cutted and pointing wrong direction.

Here’s the code I’m trying:

void Fire() {     Vector3 shootDirection = m_ShootPoint.right;      RaycastHit2D hit = Physics2D.Raycast(m_ShootPoint.position, shootDirection, m_Range);     Debug.DrawRay(m_ShootPoint.position, shootDirection.normalized * m_Range,, 20);      // On Hit, set end position where it hits     if (hit) {         CreateBulletTrace(m_ShootPoint.position, hit.point);     }     // Otherwise, render straight until it's range     else {         CreateBulletTrace(m_ShootPoint.position, shootDirection.normalized * m_Range);     } }  void CreateBulletTrace(Vector3 startPos, Vector3 endPos) {     GameObject bulletTraceObj = Instantiate(m_BulletTraceLineRendererPrefab);     LineRenderer bulletTraceLineRenderer = bulletTraceObj.GetComponent<LineRenderer>();     bulletTraceLineRenderer.useWorldSpace = true;      bulletTraceLineRenderer.SetPosition(0, startPos);     bulletTraceLineRenderer.SetPosition(1, endPos);      // Destroy(bulletTraceObj, 0.1f); } 

Note that LineRenderer checked use world space to true. What am I missing?

Using Unity 2019.1.0f2.

missing field position on a wordpress website

I’m using Eduma WordPress theme on my website and in my google search console it shows this error for all of my pages:

Missing field "position" 

I never had this error before and it appeared suddenly. Do you have any solutions? By the way, I should say I don’t know to code well, so if you can give simple or plugin related solutions. Here is a sample page: enter image description here

How to compute the difference between position vectors in c++ [closed]

I am an 2nd year engineering student with very little experience with anything to do with coding. I am working on a design project where we are building an X-Y Plotter to generate “random” motion in a rainfall simulator that is being used in a lab.

I have been able to write a program in C++ that will generate an x_coordinate and a y_coordinate as you can see below. I was wondering if anyone had suggestions on how I could store the position it is currently at [x1,y1] and find the distance to the second position [x2, y2] from that last position.

I am hoping my final result will be a program which:
Step 1: Generates a position.
Step 2: Moves to that position.
Step 3: Generates a new position.
Step 4: Calculates the distance to the new position.
Step 5: Repeat steps 2-4

Any advice or direction on what to research would save me lots of time. Thanks!

#include <iostream> #include <stdlib.h>     /* srand, rand */ #include <stdio.h>      /* printf, NULL */ #include <random>  float x_position; float y_position; float x_coordinate; float y_coordinate; int x_MAX; int y_MAX; int i = 0; int positionCount = 100; using namespace std;   int main() {   //Create Limits      cout << "Enter Max Value for X:";         cin >> x_MAX;     cout << "Enter Max Value for Y:";     cin >> y_MAX;      srand(1);     //Generate Coordinates     while (i < positionCount) {          x_coordinate = rand() % x_MAX;         y_coordinate = rand() % y_MAX;          cout << "New Position Coordinate is: [" << x_coordinate << "," << y_coordinate << "]" <<endl;           i++;   }     return 0; } ```