## Is this language L = {w $\in$ {a,b}$^*$ : ($\exists n \in \mathbb{N}$)[$w|_b = 5^n$]} regular?

Let’s say we have the language L = {w $$\in$$ {a,b}$$^*$$ : ($$\exists n \in \mathbb{N}$$)[$$w|_b = 5^n$$]}. I want to know if this is a regular language or not. How do I go about doing this? I’m familiar with the Myhill-Nerode theorem but I don’t know how to apply it.

Posted on Categories proxies

## Grammar for the following language: L = {$a^{k}$$b^{n}$$a^{m}$ : m,n,k $\in$$N^{+}$ $\land$ m + k $\geq$ n}

I’m trying to create a grammar (having the highest type) for the language:

L = {$$a^{k} b^{n} a^{m}$$ : m,n,k $$\in$$ $$N^{+}$$ $$\land$$ m +k $$\geq$$ n}

I’m not finding any good approach for it. Hints or ideas?

Thanks!

Posted on Categories proxies

## Given the Equivalence relation R = { x, y $\in$ $\Bbb{Z}$ : (x+y) mod 2 = 0}, what are equivalence classes 1 and 2?

Given the Equivalence relation R = { x, y $$\in$$ $$\Bbb{Z}$$ : (x+y) mod 2 = 0}, what are equivalence classes of 1 and 2?

I can’t really see the equivalence classes of infinite sets. Only by having a drawing of all elements can I distinguish the answers, wich is not the case in the above mentioned example.

What would be the best way to tackle such problems?

Thanks!

Posted on Categories proxies

## How to show that every quadratic, asymptotically nonnegative function $\in \Theta(n^2)$

In the book CLRS the authors say that every quadratic, asymptotically nonnegative function $$f(n) = an^2 + bn + c$$ is an element of $$\Theta(n^2)$$. Using the following definition

\begin{align*} \Theta(n^2) = \{h(n) \,|\, \exists c_1 > 0, c_2 > 0, n_0 > 0 \,\forall n \geq n_0: 0 \leq c_1n^2 \leq h(n) \leq c_2n^2\} \end{align*}

the authors write that $$n_0 = 2*\max(|b|/a, \sqrt{|c|/a})$$.

I have difficulties proving that the value of $$n_0$$ is indeed that value.

We know that $$a \ge 0$$ because otherwise $$f$$ would not be asymptotically nonnegative. Calculating the roots of $$f$$ gives us:

\begin{align*} n_{1/2} &= \frac{-b \, \pm \, \sqrt{b^2 – 4ac} }{2a} \ &\leq \frac{|b| + \sqrt{b^2 – 4ac} }{a} \end{align*}

The case $$c \ge 0$$ gives us:

\begin{align*} \frac{|b| + \sqrt{b^2 – 4ac} }{2a} \leq \frac{|b| + \sqrt{b^2} }{a} = 2\frac{|b|}{a} \end{align*}

which is two times the first argument of the $$\max$$ function.

But what about the case $$c < 0$$? How can we find an upper bound for that? Where does the value $$\sqrt{|c|/a}$$ actually come from?

Posted on Categories proxies

## Fatal Error: Call to undefined function is_loaded() in… em Codeigniter (Objetivo: PayPal Payouts)

Estou com o seguinte erro:

Fatal error: Uncaught Error: Call to undefined function is_loaded() in C:\xampp\htdocs\englishup\paypal\codeigniter\system\core\Controller.php:73 Stack trace: #0 C:\xampp\htdocs\englishup\paypal_test.php(7): CI_Controller->__construct() #1 {main} thrown in C:\xampp\htdocs\englishup\paypal\codeigniter\system\core\Controller.php on line 73

Sou novato em php e estou usando a framework do Codeigniter e meu objetivo é “printar” os dados (HTTP_HEADERS) em forma de URI, ou qualquer outra coisa que eu consiga visualizar para ver se o teste em Payouts (forma de pagamento em massa do PayPal) foi executado com sucesso e está funcionando. Seguem abaixo os códigos completos, mas a pasta completa vocês podem encontrar em: https://github.com/angelleye/paypal-codeigniter ou vocês podem estar baixando por aqui, que é o código mais completo ainda: https://www.codeigniter.com/download

paypal_test.php (está na pasta raiz /www)

<?php $system_path = "paypal/codeigniter/system"; define('BASEPATH', str_replace("\", "/",$  system_path));      //SE EU DESABILITAR ESTA LINHA APARECE A MENSAGEM DE ERRO "No direct script access allowed" include "paypal/codeigniter/system/core/Controller.php";      //SE EU DESABILITAR ESTA LINHA APARECE O ERRO "Fatal error: Class 'CI_Controller' not found in C:\xampp\htdocs\englishup\paypal\codeigniter\application\controllers\paypal\templates\Payouts.php on line 13" include "paypal/codeigniter/application/controllers/paypal/templates/Payouts.php"; $bd = new Payouts();$  print =  $bd->paypal_payout(); var_dump($  print); ?> 

Payouts.php (Este é o arquivo principal onde quero que apareçam os dados do teste. Está em /www/paypal/codeigniter/application/controllers/paypal/templates/)

<?php  /** * paypal payouts example for php * if it makes things easier for you can buy me a coffee @ paypal > mohandez@hotmail.com * * @package            PHP * @subpackage        Libraries * @category        Libraries * @author            AbdAllah Khashaba * @link            https://khashabawy.com */ //include "../../../../system/core/Controller.php";    //This is the CI_Controller class class Payouts extends CI_Controller {     public function paypal_payout(){         /// PayPal Data         $mode = "sandbox"; // change to "live" or "sandbox"$  paypal_app = array(             "mode" => "sandbox",             "sandbox"=> array(                 "client_id"=>"AQZynIyzCG4ypt_0WXAptzkpDrKAJJ2QxqnGdvatCLV0tdy0ZfkX9RQzBUhVAMJnSVfcWTHxeuwuujGx", // change                 "secret"=>"EKaeJASyyiC67xm6D-iPk06-J0HxfzgrU1BvFGUunP4hFRdzSd72PgqiWQhDyCHJulxqZxk-26A9L_iQ",  // change                 "endpoints"=>array(                     "oauth2" => "https://api.sandbox.paypal.com/v1/oauth2/token",                     "payout" => "https://api.sandbox.paypal.com/v1/payments/payouts",                 )             ),             "live"=> array(                 "client_id"=>"xx",  // change                 "secret"=>"yy",  // change                 "endpoints"=>array(                     "oauth2" => "https://api.paypal.com/v1/oauth2/token",                     "payout" => "https://api.paypal.com/v1/payments/payouts",                 )             )                     );         $client_id =$  paypal_app[$mode]["client_id"];$  secret = $paypal_app[$  mode]["secret"];         $endpoints =$  paypal_app[$mode]["endpoints"]; ////// PayOut data$  PO_id = mt_rand(100000000000000,999999999999999);  //time();  change         $PO_amount = 8.00; // change$  batch = array(             "sender_batch_header" => array(                 "sender_batch_id" => $PO_id, "email_subject" => "You have a payout!", "email_message" => "You have received a payout! Thanks for using our service!", ), "items" => array( 0 => array( "recipient_type" => "EMAIL", "amount" => array( "value" =>$  PO_amount,                         "currency" => "BRL",                     ),                     "note"=> "Thanks for your patronage!",                     "sender_item_id"=> "201403140001",                     "receiver"=> "rogeriobsoares5-buyer@gmail.com",                 )             )         );         $batch_data = json_encode($  batch);                 /// Starting OAuth          $this->load->library("curl");$  endpoint = $endpoints["oauth2"];$  this->curl->create($endpoint);$  this->curl->ssl(FALSE);                 $this->curl->post("grant_type=client_credentials");$  this->curl->http_header("Accept","application/json");         $this->curl->http_header("Accept-Language","en_US");$  this->curl->http_login($client_id,$  secret,"client_credentials");         $returned =$  this->curl->execute();                 //$this->curl->debug(); unset($  this->curl);         $result = json_decode($  returned);          ///// getting Access Token                       $nonce =$  result->nonce;         $access_token =$  result->access_token;         $token_type =$  result->token_type;         $app_id =$  result->app_id;         $expires_in =$  result->expires_in;         ///// PayOut Processing         $this->load->library("curl");$  endpoint = $endpoints["payout"];$  this->curl->create($endpoint);$  this->curl->ssl(FALSE);                 $this->curl->http_header("Content-Type","application/json");$  this->curl->http_header("Authorization","Bearer $access_token");$  this->curl->post($batch_data);$  this->curl->http_login($client_id,$  secret,"client_credentials");         $returned =$  this->curl->execute();                 //$this->curl->debug(); unset($  this->curl);         $result = json_decode($  returned);         if($result &&$  result->batch_header->batch_status == "PENDING" ){             $links =$  result->links;             $link =$  links;             $endpoint =$  link->href;             $this->load->library("curl");$  this->curl->create($endpoint);$  this->curl->ssl(FALSE);                     $this->curl->http_header("Content-Type","application/json");$  this->curl->http_header("Authorization","Bearer $access_token");$  returned = $this->curl->execute();$  result = json_decode($returned); } echo "<pre>"; print_r($  result);         echo "</pre>";         $index1 =$  this->index();             } } ?> 

Controller.php (está em /www/paypal/codeigniter/system/core/)

## Let $X$ a set, $R$ a ring of set of $X$ and $C$ the class of subset $E$ of $X$ such that $E$ o $E^c$ $\in R$ then C is a algebra of set

Let $$X$$ a set, $$R$$ a ring of set of $$X$$ and $$C$$ the class of subset $$E$$ of $$X$$ such that $$E$$ o $$E^c$$ $$\in R$$ then C is a algebra of set and $$C=a(R)$$ (generated algebra of $$R$$)

My attempt:

As $$R$$ is a ring we know satisfy this:

i)$$\emptyset\in R$$
ii) $$A,B \in R \implies A\cup B \in R$$
iii)$$A,B \in R \implies A\cap B \in R$$
iv)$$A,B\in R \implies A-B\in R$$

Let $$C=\{E\subset X : E\in R \text{ or } E^c\in R\}$$

We need prove $$C$$ is a algebra.

Note, $$C$$ is an algebra if:

i)$$\emptyset\in C$$
ii) $$A,B \in C \implies A\cup B \in C$$
iii)$$A,B \in C \implies A\cap B \in C$$
iv)$$A\in C \implies A^c\in C$$

By definition of $$C$$ the properties $$i),ii),iii)$$ are trivial.

Let see if $$A\in C \implies A^c\in C$$

Let $$A\in C\implies (A^c)^c=A\in C$$ but here i’m a little stuck.

Moreover, as $$C$$ is an algebra then by definicion $$C \subset a(R)$$

I need see $$a(R) \subset C$$. Here i’m stuck, can someone help me?

## Would this salvage the $\in|=$ exchange naive set theory?

This is a possible salvage for the failed attempt in this posting.

The salvage here is to require that every subformula $$\psi(y)$$ of $$\phi$$ having no parameter other than those in $$\phi$$, must satsify the antecdent of comprehension. To write this formally, it is:

Comprehension: If $$\phi$$ is a formula in the first order language of set theory (i.e.;$$\sf FOL(=,∈))$$, in which the symbol $$“x”$$ doesn’t occur free, and if $$\psi_1(y),..,\psi_n(y)$$ are all subformulas of $$\phi$$ in which $$y$$ is free, and having no parameter that is not a parameter of $$\phi$$; then: $$[\bigwedge_{i=1}^n \big{(}\exists y ((\psi_i(y))^=) \wedge \exists y ((\neg \psi_i(y))^=) \big{)} \to \exists x \forall y (y \in x \iff \phi)]$$ ; is an axiom.

Axiom of Multiplicity: $$\forall x,y \ \exists z (z \neq x \land z \neq y)$$

/

I personally think this is complex a little bit, I highly doubt its consistency though. Yet if there is a chance that this is consistent, then it would actually prove all axioms of $$\sf NF$$, since full Extensionality is assumed here.

## Ayuda: Warning: count(): Parameter must be an array or an object that implements Countable in… ¿alguna solucion?

![El error me da en count(\$ valur[“id”]) lo que en si trato de sacar el numero de comentarios ] Espero su ayuda compañeros gracias de antemano !!!!!!!!!! (https://i.stack.imgur.com/NIFtl.png)

Posted on Categories buy proxy servers