Is it incorrect too say that this function problem cannot be in $FNP$?

Decision Problem: Is $ 2^k$ + $ M$ NOT a prime?

Function Variant: Output the non-prime result of $ 2^k$ + $ m$

We can consider, $ M$ = $ 0$ .

Proof that calculating 2^n requires 2^n digits as the result


Is it true that a non-deterministic machine cannot output $ 2^n$ digits in polynomial time?

Does this mean that the problem is not in $ FNP$ ?

Is the DMG 3/4 cover diagram in 5e incorrect?

From page 250 and 251 of the DMG:

To determine whether a target has cover against an attack or other effect on a grid, choose a corner of the attacker’s space… trace imaginary lines from that corner to every corner of any one square the target occupies. If one or two of those lines are blocked by an obstacle (including another creature), the target has half cover…

grid diagrams taken from the DMG. The final diagram shows the construction lines provided in the DMG to determine cover (showing 3/4th cover) as well as the question askers own construction lines, superimposed showing it should be half cover.

It looks like they just chose the wrong corner. If the attacker was moved one square to the north it would be 3/4 cover. Or do you think they meant "choose the closest corner"?

Is it correct or incorrect to say that an input say $C$ causes an average run-time of an algorithm?

I was going through the text Introduction to Algorithm by Cormen et. al. where I came across an excerpt which I felt required a bit of clarification.

Now as far as I have learned that that while the Best Case and Worst Case time complexities of an algorithm arise for a certain physical input to the algorithm (say an input $ A$ causes the worst case run time for an algorithm or say an input $ B$ causes the best case run time of an algorithm , asymptotically), but there is no such physical input which causes the average case runtime of an algorithm as the average case run time of an algorithm is by it’s definition the runtime of the algorithm averaged over all possible inputs. It is something I hope which only exists mathematically.

But on the other hand inputs to an algorithm which are neither the best case input nor the worst case input is supposed to be somewhere in between both the extremes and the performance of our algorithm is measured on them by none other than the average case time complexity as the average case time complexity of the algorithm is in between the worst and best case complexities just as our input between the two extremes.

Is it correct or incorrect to say that an input say $ C$ causes an average run-time of an algorithm?

The excerpt from the text which made me ask such a question is as follows:

In context of the analysis of quicksort,

In the average case, PARTITION produces a mix of “good” and “bad” splits. In a recursion tree for an average-case execution of PARTITION, the good and bad splits are distributed randomly throughout the tree. Suppose, for the sake of intuition, that the good and bad splits alternate levels in the tree, and that the good splits are best-case splits and the bad splits are worst-case splits. Figure(a) shows the splits at two consecutive levels in the recursion tree. At the root of the tree, the cost is $ n$ for partitioning, and the subarrays produced have sizes $ n- 1$ and $ 0$ : the worst case. At the next level, the subarray of size $ n- 1$ undergoes best-case partitioning into subarrays of size $ (n-1)/2 – 1$ and $ (n-1)/2$ Let’s assume that the boundary-condition cost is $ 1$ for the subarray of size $ 0$ .

The combination of the bad split followed by the good split produces three sub- arrays of sizes $ 0$ , $ (n-1)/2 – 1$ and $ (n-1)/2$ at a combined partitioning cost of $ \Theta(n)+\Theta(n-1)=\Theta(n)$ . Certainly, this situation is no worse than that in Figure(b), namely a single level of partitioning that produces two subarrays of size $ (n-1)/2$ , at a cost of $ \Theta(n)$ . Yet this latter situation is balanced! Image

Tabled Value Function returns incorrect or no results

I recently learned of TVF’s and it seemed like it was exactly what I was looking for. I did my first attempt at one and it is not going well.

Here is my code:

USE [RMC_Tracker] GO /****** Object:    UserDefinedFunction [dbo].[TFV_Dashboard] 9:08:08 AM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO    Script Date: 4/13/2020  -------------------------------------------- Author:    John Clark Create date: 4/12/2020 Description: Returns a recordset for the RMC Tracker  ALTER FUNCTION [dbo].[TVF_Dashboad] ( -- Add the parameters for the function here @CompDate datetime = NULL  ) RETURNS TABLE AS RETURN ( -- Add the SELECT statement with parameter references here SELECT    dbo.ACTIVE.RECORD_ID, dbo.ACTIVE.CMD_ID, dbo.ACTIVE.EQUIPMENT, dbo.ACTIVE.EquipDes,            dbo.ACTIVE.CASREP,dbo.ACTIVE.[UPDATE], dbo.ACTIVE.TYAST,                dbo.ACTIVE.STATUS,dbo.ACTIVE.JCN, dbo.COMMANDS.Trigrpah  FROM      dbo.ACTIVE INNER JOIN dbo.COMMANDS ON dbo.ACTIVE.CMD_ID = dbo.COMMANDS.CMD ID   WHERE    (dbo.ACTIVE. RECCLS = @CompDate) ) 

I call this Function from within MS Access via a Pass Through Query:

SELECT * FROM dbo.TVF_DashBoard(default) 

It returns an empty set. What I am trying to do is create a simple Function that allows me to return a table that can be toggle based on whether a field (RECCLS) is either Null or Not Null.

Any assistance would be appreciated.

Proving a Greedy Algorithm is Incorrect by Providing Counter Example and Coming up with another correct algorithm

I want to come up with a counter example that proves the following greedy algorithm doesn’t work and give an alternative correct algorithm. The problem is I have an array of numbers and I want to reach the last element of the array in the minimum number of steps. At each step, I can move to any element with the same value, move forward one, or move backward one. The greedy criterion is to move furthest to the right as much as possible. For example, if we have array {1,2,3,4,1,5}, the algorithm will start at 1 move to 1 before the 5 then moves to 5 with number of steps of 2.

An an example of input instance that proves the given greedy algorithm wrong might be {1,2,1,3,2} where the given algorithm crosses the array in 3 steps whereas there is an optimal solution of moving from 1 to the second 2 right to last 2 in two steps. Now, what is a correct algorithm for solving this problem ?

man-in-the-middle’d packets have bad and incorrect checksums on localhost, how to find the malware?

Am trying to fix a man-in-the-middle’d macOS Catalina machine. Have been viewing packets with tcpdump and noticed, on connecting to any web address, there are legit packet that gets sent to the DNS server… then… there are packets that get sent from (or some port) to — the packet headers are labelled with incorrect checksum (cksum -> incorrect). Also, there are packets (or some other port) -> labelled bad checksum (bad udp cksum). And, again localhost, -> again with bad checksum (bad udp cksum). All this traffic is on the lo0 adapter.

Example of a man-in-the-middle incident on the machine:

Legit: Wiki article on different machine and different network Wiki article on man-in-the-middle'd machine

MITM: Wiki article on man-in-the-middle’d machine Wiki article on different machine and different network

Packet traces

Incorrect checksum destination Incorrect checksum destination

Bad checksum destination Bad checksum destination

Bad checksum source destination Bad checksum source destination

Attempts to find process:

sudo lsof -i sudo lsof -i

netstat netstat

My guess is this is related to some corruption with mDNSResponder? Welcoming and appreciate any tips or suggestions on how to solve.

Many thanks

Is it incorrect to use Passive Insight to tell Players what their Characters already know about NPCs?

I have a party of 4 noobs, 1 is a pro on other games but new to 5e (like myself – but I haven’t played in years), 3 are actually playing their first characters ever. Ages run from 13 to 50 (I love a challenge).

I don’t like telling players what they can and cannot do if the rules do not explicitly state it, but I also hate to bash new characters for new player naivety. I also try to keep house rules to a minimum (just to make it easier for them to learn the basic rules). So I kind of “chose” to read the Passive Insight score as a social version of the Passive Perception which can “determine whether anyone in the group notices a hidden threat” (PHB Ch.8).

One of the PCs, a 1st-Level Rogue, was setting a trap for a Slaver Ship Captain & Crew to aid the City Guard. To add to the tension, I had the Captain make a snide reference to the human cargo as ‘commodities.’ The Player, morally offended, snapped back, “shut up you freaking idiot.” Caught off-guard, I asked for his Passive Insight and responded, “With your knowledge of the underworld, you know insulting him like that in front of his men will require a violent show of authority. You can say that, but are you sure you want to?”

A little later the same Player went to strike a final blow to a surrendering NPC while others were striking to incapacitate. I did the same thing, ending with, “Your character has been around enough to know that executing a defenseless man in front of the guard would be murder. They might not notice, or they might let it go, but maybe not. Do you want to kill him or knock him unconscious?”

I’m willing to let the Players do the wrong thing and suffer consequences, I just want them to know the consequences ahead of time. The worst part is that I already know the score – it’s on the inside of my screen along with his AC & HP, I’m only asking to make it come from his character’s mind instead of my mouth. Of course, I fear that come will across as passive-aggressively robbing them of agency – which is why I’ve only done that about 3 other times in 13 sessions so far.

My question is, am I actually within the rules by doing this?

Bonus question: Is this a actually a spineless way to force character behavior while pretending like I’m giving them free will?

Incorrect syntax near ‘@dni’

Estoy tratando de crear un procedimiento almacenado que realice un INSERT y ademas me cree un usuario. El procedimiento en cuestión:

CREATE PROCEDURE dbo.nuevoGerente(@dni AS INT, @apellidos AS NVARCHAR(100), @nombres AS NVARCHAR(100)) AS BEGIN     INSERT INTO datosComunes.personas (dni, apellidos, nombres, usuario) VALUES (@dni, @apellidos, @nombres, @dni);     DECLARE @idPersona INT;     SET @idPersona = (SELECT dni FROM datosComunes.personas WHERE (dni = @dni));     CREATE USER @dni WITHOUT LOGIN; END 

El problema es que me arroja este error: “Incorrect syntax near ‘@dni’. Expecting ID or QUOTED_ID”. Estoy tratando de encontrar cual es el error pero por el momento no encuentro informacion sobre ello.

InfoPath: Drop down choice shows incorrect data

I’ve just published an InfoPath Form, however, when I open up the form in SharePoint my drop downs are displaying the incorrect choices. ie. for choice 1 SharePoint displaying the choices from drop down 3.

enter image description here

I’ve continued to publish and wonder how to sort my fields again so that the choices show up in the correct places. Any help would be greatly appreciated as this is urgent. Thank you