There exists a surjection from {4,5,6} to {√2,√3,2,√5}. why this statement is wrong?
时间: 2024-06-06 07:07:53 浏览: 9
This statement is wrong because the cardinality of {4,5,6} is 3, whereas the cardinality of {√2,√3,2,√5} is 4. In order for a surjection to exist between two sets, the domain must have at least as many elements as the range. Therefore, it is impossible for a surjection to exist from {4,5,6} to {√2,√3,2,√5}.
相关问题
There exists a surjection from {4,5,6} to {根号2,根号三,2,根号五}这句话为啥错的
This sentence is incorrect because it is written in a mix of Chinese and English. A correct translation of the sentence would be "There exists a surjection from {4,5,6} to {√2,√3,2,√5}."
select id from a not in (1,2,3,4,5)优化一下这个sql
可以尝试用`not exists`或`left join`的方式代替`not in`,因为`not in`的查询效率比较低,而且当被比较的列表比较大时,效率会更低。以下是两种优化方式的示例代码:
使用not exists:
```
select id from a where not exists (select 1 from b where a.id = b.id and b.id in (1,2,3,4,5));
```
使用left join:
```
select a.id from a left join b on a.id = b.id and b.id in (1,2,3,4,5) where b.id is null;
```
这里假设表b中存储了需要排除的id,如果需要排除的id比较少,那么使用`not in`也可以,但是如果需要排除的id比较多,那么使用上述两种方式会更有效率。
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)